/* LINK — shared component styles. Every value comes from tokens.css; no raw colours. */
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
.lk-pad { padding: var(--space-5); }
.lk-stack { display: flex; flex-direction: column; gap: var(--space-3); }
.lk-wrap { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.lk-cap { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.lk-ico { width: 18px; height: 18px; flex: none; }

/* Button */
.lk-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--size-btn-md); padding: 0 18px; border-radius: var(--radius-pill); border: 1px solid transparent; font: 500 14px/1 var(--font-sans); white-space: nowrap; box-sizing: border-box; cursor: pointer; transition: transform .12s var(--ease, ease); }
.lk-btn:active { transform: scale(.98); }
.lk-btn:focus-visible, .lk-icon-btn:focus-visible, .lk-seg button:focus-visible, .lk-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-btn svg { width: 17px; height: 17px; }
.lk-btn--sm { height: var(--size-btn-sm); padding: 0 12px; font-size: 13px; }
.lk-btn--sm svg { width: 16px; height: 16px; }
.lk-btn--lg { height: var(--size-btn-lg); padding: 0 22px; font-size: 16px; }
.lk-btn--main { font-weight: 600; color: var(--on-accent); border-color: var(--btn-main-border); background: linear-gradient(180deg, var(--btn-main-top) 0%, var(--btn-main-bottom) 100%); box-shadow: var(--btn-main-shadow); }
.lk-btn--secondary { color: var(--ink); background: var(--btn-secondary-bg); }
.lk-btn--quiet { color: var(--ink-soft); background: transparent; padding: 0 10px; }
.lk-btn--danger { color: var(--bad); background: transparent; padding: 0 10px; }
.lk-btn--done { font-weight: 600; color: var(--good); border-color: var(--good-line); background: var(--good-tint); }
.lk-btn--working { opacity: .6; cursor: progress; }
.lk-btn--full { width: 100%; }
.lk-icon-btn { position: relative; width: var(--size-btn-md); height: var(--size-btn-md); border-radius: var(--radius-pill); border: 0; background: transparent; color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.lk-icon-btn svg { width: 20px; height: 20px; }
.lk-icon-btn .lk-new { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }

/* Status, tags, counts */
.lk-status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.lk-status::before { content: ""; width: var(--size-dot); height: var(--size-dot); border-radius: 50%; background: var(--ink-muted); flex: none; }
.lk-status--good::before { background: var(--good); }
.lk-status--warn::before { background: var(--warn); }
.lk-status--bad::before { background: var(--bad); }
.lk-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-tag); background: var(--surface-2); color: var(--ink-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
.lk-tag--good { background: var(--good-tint); color: var(--good); }
.lk-tag--warn { background: var(--warn-tint); color: var(--warn); }
.lk-tag--bad { background: var(--bad-tint); color: var(--bad); }
.lk-tag--accent { background: var(--accent-tint); color: var(--accent); }
.lk-count { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; }

/* Card and section heading */
.lk-card { background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-card); padding: var(--space-5); box-shadow: var(--card-shadow); box-sizing: border-box; }
.lk-card--flush { padding: 0; overflow: hidden; }
.lk-card--flush > .lk-card-head { padding: 18px var(--space-5) 6px; margin: 0; }
.lk-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 0 0 var(--space-3); }
.lk-card-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.lk-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.lk-link svg { width: 14px; height: 14px; }
.lk-link--accent { color: var(--accent); font-weight: 600; }

/* List row */
.lk-list-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); }
.lk-list-row:first-child { border-top: 0; }
.lk-row-main { flex: 1; min-width: 0; }
.lk-row-title { font-size: 14px; font-weight: 500; line-height: 1.3; color: var(--ink); }
.lk-row-meta { font-size: 13px; line-height: 1.35; color: var(--ink-muted); margin-top: 3px; }
.lk-chev { color: var(--ink-muted); display: inline-flex; }
.lk-chev svg { width: 16px; height: 16px; }
.lk-date { width: 40px; flex: none; text-align: center; }
.lk-date b { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-muted); }
.lk-date span { display: block; font-size: 18px; font-weight: 600; line-height: 1.1; color: var(--ink); }
.lk-lead-icon { width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-muted); }
.lk-lead-icon svg { width: 20px; height: 20px; }

/* Avatar and area badge */
.lk-avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; object-fit: cover; }
.lk-avatar--24 { width: 24px; height: 24px; font-size: 11px; }
.lk-avatar--44 { width: 44px; height: 44px; font-size: 16px; }
.lk-avatar--64 { width: 64px; height: 64px; font-size: 23px; }
.lk-badge { width: 32px; height: 32px; border-radius: 50%; flex: none; display: block; }
.lk-badge--20 { width: 20px; height: 20px; }
.lk-badge--24 { width: 24px; height: 24px; }
.lk-badge--44 { width: 44px; height: 44px; }
.lk-badge--52 { width: 52px; height: 52px; }
.lk-badge--64 { width: 64px; height: 64px; }
.lk-crest { width: 32px; height: 32px; border-radius: 50%; flex: none; background: var(--surface-2); box-shadow: 0 0 0 1px var(--line-strong); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); }

/* Segmented control */
.lk-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-seg); background: var(--seg-bg); border: 1px solid var(--line); }
.lk-seg button { height: 30px; padding: 0 12px; border: 0; border-radius: var(--radius-seg-option); background: transparent; color: var(--ink-soft); font: 500 13px var(--font-sans); cursor: pointer; }
.lk-seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: var(--seg-on-shadow); color: var(--ink); font-weight: 600; }

/* Page tabs */
.lk-tabs { display: flex; border-bottom: 1px solid var(--line); overflow-x: auto; }
.lk-tabs a { position: relative; height: 44px; display: inline-flex; align-items: center; padding: 0 2px; margin-right: 22px; text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.lk-tabs a[aria-current="page"] { font-weight: 600; color: var(--ink); }
.lk-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.lk-tabs .n { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }

/* Fields */
.lk-field { min-width: 0; }
.lk-label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.lk-label .hint { font-weight: 400; color: var(--ink-muted); }
.lk-input { width: 100%; height: var(--size-btn-md); box-sizing: border-box; border-radius: var(--radius-field); border: 1px solid var(--line-strong); background: var(--field); color: var(--ink); font: 14px var(--font-sans); padding: 0 12px; outline: none; }
textarea.lk-input { height: auto; padding: 10px 12px; line-height: 1.5; resize: none; }
.lk-input::placeholder { color: var(--ink-muted); }
.lk-input:focus, .lk-input--focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.lk-input--error { border-color: var(--bad); }
.lk-select { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.lk-select svg { width: 16px; height: 16px; color: var(--ink-muted); }
.lk-error { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--bad); }
.lk-error svg { width: 15px; height: 15px; }
.lk-help { margin-top: 6px; font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
.lk-chip { height: 32px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--ink-soft); font: 500 13px var(--font-sans); cursor: pointer; }
.lk-chip[aria-pressed="true"] { background: var(--accent-tint); border-color: var(--accent); color: var(--ink); font-weight: 600; }
.lk-choice { display: flex; align-items: flex-start; gap: var(--space-3); width: 100%; text-align: left; padding: 13px 14px; box-sizing: border-box; border-radius: var(--radius-menu); border: 1px solid var(--line-strong); background: var(--surface-1); color: var(--ink); font-family: inherit; cursor: pointer; }
.lk-choice::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); box-sizing: border-box; flex: none; margin-top: 1px; }
.lk-choice[aria-checked="true"] { border-color: var(--accent); }
.lk-choice[aria-checked="true"]::before { border: 5px solid var(--accent); }
.lk-choice b { display: block; font-size: 14px; font-weight: 600; }
.lk-choice small { display: block; font-size: 13px; color: var(--ink-muted); margin-top: 2px; line-height: 1.45; }
.lk-toggle-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.lk-toggle { width: 40px; height: 24px; border-radius: var(--radius-pill); border: 0; background: var(--line-strong); position: relative; cursor: pointer; flex: none; padding: 0; }
.lk-toggle::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--toggle-knob); transition: left .15s; }
.lk-toggle[aria-checked="true"] { background: var(--accent); }
.lk-toggle[aria-checked="true"]::after { left: 19px; }

/* Sheet */
.lk-sheet { width: var(--size-sheet); max-width: 100%; background: var(--popover); border-left: 1px solid var(--line-strong); display: flex; flex-direction: column; box-sizing: border-box; }
.lk-sheet--phone { width: 100%; border-left: 0; border-top: 1px solid var(--line-strong); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; }
.lk-sheet-head { display: flex; align-items: center; gap: var(--space-3); padding: 18px 22px; border-bottom: 1px solid var(--line); }
.lk-sheet-head h3 { margin: 0; font-size: 17px; font-weight: 700; }
.lk-sheet-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-muted); }
.lk-sheet-body { flex: 1; overflow: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.lk-sheet-foot { display: flex; align-items: center; gap: var(--space-2); padding: 14px 22px; border-top: 1px solid var(--line); }
.lk-sheet-foot .grow { flex: 1; }
.lk-close { width: 36px; height: 36px; border: 0; border-radius: var(--radius-field); background: transparent; color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.lk-close svg { width: 18px; height: 18px; }

/* More menu */
.lk-menu { min-width: 220px; max-width: 360px; padding: 6px; border-radius: var(--radius-menu); background: var(--popover); border: 1px solid var(--line-strong); box-shadow: var(--pop-shadow); box-sizing: border-box; }
.lk-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: var(--radius-seg-option); background: transparent; color: var(--ink); font: 500 14px var(--font-sans); text-align: left; cursor: pointer; }
.lk-menu button svg { width: 17px; height: 17px; color: var(--ink-muted); }
.lk-menu button:hover, .lk-menu button:focus-visible { background: var(--surface-2); outline: none; }
.lk-menu .sep { height: 1px; margin: 6px 4px; background: var(--line); }
.lk-menu .danger, .lk-menu .danger svg { color: var(--bad); }
.lk-menu-label { padding: 6px 10px 4px; font-size: 12px; font-weight: 600; color: var(--ink-muted); }

/* Toast */
.lk-toast { display: inline-flex; align-items: center; gap: 14px; min-height: 44px; padding: 8px 8px 8px 14px; box-sizing: border-box; border-radius: var(--radius-menu); background: var(--popover); border: 1px solid var(--line-strong); box-shadow: var(--toast-shadow); font-size: 13px; color: var(--ink); max-width: 600px; }
.lk-toast button { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--accent); font: 600 13px var(--font-sans); cursor: pointer; }

/* Empty state */
.lk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 20px; }
.lk-empty svg { width: 28px; height: 28px; color: var(--ink-muted); margin-bottom: 6px; }
.lk-empty b { font-size: 15px; font-weight: 600; }
.lk-empty p { margin: 0 0 10px; max-width: 320px; font-size: 13px; line-height: 1.45; color: var(--ink-muted); }

/* Progress */
.lk-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.lk-bar i { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
.lk-bar--done i { background: var(--good); }
.lk-blocks { display: flex; gap: 4px; }
.lk-blocks i { flex: 1; height: 10px; border-radius: 3px; background: var(--surface-2); }
.lk-blocks i.on { background: var(--accent); }
.lk-blocks--done i.on { background: var(--good); }

/* Stat */
.lk-stat-num { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lk-stat-num small { font-size: 14px; font-weight: 500; color: var(--ink-muted); letter-spacing: 0; }
.lk-stat-label { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }

/* Register marks */
.lk-mark { width: 40px; height: 40px; border-radius: var(--radius-menu); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; flex: none; background: var(--surface-1); color: var(--ink-soft); border: 1px solid var(--line-strong); box-sizing: border-box; cursor: pointer; }
.lk-mark--present { background: var(--good-tint); color: var(--good); border-color: var(--good); }
.lk-mark--late { background: var(--warn-tint); color: var(--warn); border-color: var(--warn); }
.lk-mark--absent { background: var(--bad-tint); color: var(--bad); border-color: var(--bad); }
.lk-mark--phone { width: var(--size-tap); height: var(--size-tap); }

/* Frame: sidebar, top bar, phone tab bar */
.lk-sidebar { width: var(--size-sidebar); box-sizing: border-box; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--chrome); display: flex; flex-direction: column; gap: 20px; }
.lk-sidebar .logo { height: 26px; width: auto; align-self: flex-start; margin: 2px 10px 4px; }
.lk-switcher { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px; border-radius: var(--radius-menu); border: 1px solid var(--line); background: var(--surface-1); color: var(--ink); font: 600 14px var(--font-sans); text-align: left; cursor: pointer; }
.lk-switcher .lk-chev { margin-left: auto; }
.lk-switcher .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-nav { display: flex; flex-direction: column; gap: 2px; }
.lk-nav-label { font-size: 12px; font-weight: 500; color: var(--ink-muted); padding: 0 10px 6px; }
.lk-nav a { display: flex; align-items: center; gap: 11px; height: var(--size-nav-item); padding: 0 10px; border-radius: var(--radius-field); text-decoration: none; color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.lk-nav a svg { width: 18px; height: 18px; color: var(--ink-muted); flex: none; }
.lk-nav a[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.lk-nav a[aria-current="page"] svg { color: var(--accent); }
.lk-nav a .n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.lk-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--radius-menu); }
.lk-me b { display: block; font-size: 14px; font-weight: 600; }
.lk-me small { display: block; font-size: 12px; color: var(--ink-muted); }
.lk-topbar { display: flex; align-items: center; gap: var(--space-3); }
.lk-search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: var(--size-btn-md); padding: 0 14px; box-sizing: border-box; border-radius: var(--radius-menu); background: var(--surface-1); border: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; }
.lk-search svg { width: 17px; height: 17px; }
.lk-search kbd { margin-left: auto; font: 600 12px var(--font-sans); color: var(--ink-muted); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-strong); }
.lk-tabbar { display: flex; padding: 0 8px 22px; background: var(--tabbar); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.lk-tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: var(--size-tabbar); text-decoration: none; color: var(--ink-muted); font-size: 11px; font-weight: 500; }
.lk-tabbar a svg { width: 22px; height: 22px; }
.lk-tabbar a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.lk-tabbar a[aria-current="page"] svg { color: var(--accent); }
.lk-tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 2px; margin-left: -11px; border-radius: 2px; background: var(--accent); }
.lk-tabbar a .lk-count { position: absolute; top: 6px; left: 50%; margin-left: 6px; }

/* Page header */
.lk-page-head { display: flex; align-items: center; gap: var(--space-4); }
.lk-page-head .ctx { font-size: 13px; color: var(--ink-muted); }
.lk-page-head h1 { margin: 4px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.lk-page-head p { margin: 4px 0 0; font-size: 15px; color: var(--ink-soft); }
.lk-page-head .acts { display: flex; gap: var(--space-2); align-items: center; margin-left: auto; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
