/* Attendances app: records, kiosk mode, monthly heat-map, overtime. Tokens only; logical properties for RTL. */
.att-ot { display: flex; flex-wrap: wrap; gap: 4px; }
.att-ot small { font-weight: 600; opacity: .85; }
.att-late { color: var(--warn-ink); font-weight: 700; }
.att-kind { white-space: nowrap; }
.att-status { display: inline-flex; align-items: center; gap: 6px; }
.att-edited { color: var(--muted); display: inline-flex; }
.att-note { margin: -6px 0 4px; }
.att-weighted { color: var(--accent-d); }
.att-who { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.att-who-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); min-width: 0; }
.att-who-item:hover { border-color: var(--accent); }
.att-who-item div { display: grid; line-height: 1.2; min-width: 0; }
.att-who-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ monthly heat-map */
.att-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.att-legend span { display: inline-flex; align-items: center; gap: 6px; }
.att-heat { max-width: 100%; }
.att-table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.att-table th, .att-table td { padding: 3px 2px; text-align: center; }
.att-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; font-weight: 700; color: var(--muted); }
.att-h-name { position: sticky; inset-inline-start: 0; z-index: 3; background: var(--panel); text-align: start !important; min-width: 170px; max-width: 210px; padding-inline: 4px 10px !important; border-inline-end: 1px solid var(--line-2); }
.att-table thead .att-h-name { z-index: 4; }
.att-h-day { min-width: 26px; }
.att-h-day span { display: block; color: var(--ink); }
.att-h-day small { font-weight: 500; opacity: .7; }
.att-h-day.hol span { color: var(--warn-ink); }
.att-h-day.rest { background: var(--panel-2); }
.att-h-tot { min-width: 54px; padding-inline: 6px !important; }
.att-table td.num { text-align: end; padding-inline: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.att-table tbody tr:hover > * { background: var(--panel-2); }
.att-table tbody tr:hover .att-h-name { background: var(--panel-2); }
.ok-t { color: var(--ok-ink); font-weight: 700; }
.att-c { padding: 3px 2px; }
.att-cell { display: block; width: 20px; height: 20px; margin: 0 auto; border-radius: 6px; background: transparent; border: 1px solid transparent; }
.att-legend .att-cell { margin: 0; }
.att-cell.s-P { background: var(--ok); }
.att-cell.s-A { background: var(--danger); }
.att-cell.s-L { background: var(--lc, var(--info)); }
.att-cell.s-L.half { background: linear-gradient(135deg, var(--lc, var(--info)) 50%, var(--panel-3) 50%); }
.att-cell.s-H { background: var(--warn); opacity: .75; }
.att-cell.s-R { background: var(--panel-3); border-color: var(--line); }
.att-cell.s-F, .att-cell.s-- { border: 1px dashed var(--line); opacity: .5; }
.att-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ------------------------------------------------------------ kiosk (full screen) */
.att-kiosk { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.att-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 28px; background: var(--side); color: var(--side-ink); }
.att-brand { display: grid; line-height: 1.2; }
.att-brand b { font-size: 20px; } .att-brand .att-mode { margin: 0; font-weight: 400; color: var(--side-muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; } .att-brand span { color: var(--side-muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.att-time { text-align: center; }
.att-clock { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.att-date { color: var(--side-muted); font-size: 14px; margin-top: 2px; }
.att-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.att-count { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 700; }
.att-tool { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: inherit; }
.att-tool:hover { background: rgba(255, 255, 255, .12); }
.att-home, .att-pin { flex: 1; width: min(1100px, 100%); margin: 0 auto; padding: 24px 24px 40px; display: grid; gap: 18px; align-content: start; }
.att-scan { display: flex; gap: 12px; max-width: 520px; width: 100%; margin: 0 auto; }
.att-badge { flex: 1; height: 56px; padding: 0 18px; font-size: 20px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); min-width: 0; }
.att-badge:focus { border-color: var(--accent); outline: 0; }
.att-hint { text-align: center; color: var(--muted); font-size: 18px; font-weight: 600; }
.att-error { text-align: center; color: var(--danger-ink); font-weight: 800; font-size: 18px; min-height: 28px; }
.att-error.ph { visibility: hidden; }
.att-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.att-tile { display: grid; justify-items: center; gap: 8px; padding: 20px 12px; min-height: 190px; border-radius: 22px; border: 2px solid var(--line); background: var(--panel); color: inherit; font: inherit; cursor: pointer; box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.att-tile:hover, .att-tile:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.att-tile:active { transform: scale(.98); }
.att-tile b { font-size: 18px; text-align: center; line-height: 1.25; }
.att-tile-av .avatar { box-shadow: 0 0 0 4px var(--line); }
.att-tile.in .att-tile-av .avatar { box-shadow: 0 0 0 4px var(--ok); }
.att-tile-state { font-size: 13px; font-weight: 700; color: var(--muted); padding: 3px 12px; border-radius: 999px; background: var(--panel-3); }
.att-tile.in .att-tile-state { background: var(--ok-soft); color: var(--ok-ink); }
.att-pin { justify-items: center; }
.att-who-big { display: grid; justify-items: center; gap: 8px; }
.att-who-big h2 { font-size: 28px; }
.att-dots { display: flex; gap: 16px; justify-content: center; }
.att-dots i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--muted); background: transparent; transition: background .1s; }
.att-dots i.on { background: var(--accent); border-color: var(--accent); }
.att-dots.bad i { border-color: var(--danger); animation: att-shake .3s; }
@keyframes att-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.att-pad { display: grid; grid-template-columns: repeat(3, 96px); gap: 14px; justify-content: center; }
.att-key { height: 80px; border-radius: 20px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font-size: 32px; font-weight: 700; cursor: pointer; font-family: inherit; }
.att-key:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.att-key:active { transform: scale(.96); }
.att-key.small { font-size: 18px; color: var(--muted); }
.att-cancel { margin-top: 6px; min-width: 200px; }
.att-done { flex: 1; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 40px 24px; border: 0; color: #fff; font: inherit; cursor: pointer; text-align: center; }
.att-done.in { background: var(--ok); } .att-done.out { background: var(--info); }
:root[data-theme="dark"] .att-done { color: #0d140f; }
.att-done-ico { display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.att-done h1 { font-size: clamp(30px, 6vw, 56px); }
.att-done-line { font-size: clamp(20px, 3.4vw, 30px); font-weight: 700; }
.att-done-sub { font-size: clamp(16px, 2.6vw, 22px); opacity: .9; }
.att-done-warn { background: rgba(0, 0, 0, .25); padding: 8px 16px; border-radius: 10px; font-weight: 700; }

@media (max-width: 720px) {
  .att-top { grid-template-columns: 1fr auto; padding: 12px 14px; }
  .att-brand { display: none; }
  .att-time { text-align: start; } .att-clock { font-size: 32px; }
  .att-tools { gap: 6px; } .att-count { padding: 4px 10px; font-size: 13px; }
  .att-tool { width: 42px; height: 42px; }
  .att-home, .att-pin { padding: 14px 12px 28px; }
  .att-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .att-tile { min-height: 150px; padding: 14px 8px; }
  .att-pad { grid-template-columns: repeat(3, 76px); gap: 10px; } .att-key { height: 64px; font-size: 26px; }
  .att-h-name { min-width: 120px; max-width: 130px; }
}
