:root {
  --bg: #e9edf4;
  --bg-2: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --main-bg: #f6f8fc;
  --border: #e4e8ef;
  --text: #232a36;
  --muted: #7a818e;
  --accent: #e11d2b;
  --accent-hover: #c8121f;
  --accent-soft: rgba(225, 29, 43, 0.10);
  --grad: linear-gradient(90deg, #f7b733 0%, #e11d2b 55%, #9f0e1b 100%);
  --green: #1ca14d;
  --green-soft: rgba(28, 161, 77, 0.12);
  --amber: #b9770a;
  --amber-soft: rgba(185, 119, 10, 0.14);
  --vac: #0d9488;
  --vac-soft: rgba(13, 148, 136, 0.12);
  --info: #2563eb;
  --info-soft: rgba(37, 99, 235, 0.12);
  --remote: #2563eb;
  --remote-soft: rgba(37, 99, 235, 0.12);
  --event: #7c3aed;
  --event-soft: rgba(124, 58, 237, 0.12);
  --radius: 16px;
  --shadow: 0 8px 22px rgba(43, 52, 84, 0.07);
  font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
button { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.ic { width: 18px; height: 18px; flex: 0 0 auto; }
.ic.sm { width: 16px; height: 16px; }

/* ---- Brand / logo (auth screens) ---- */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.2px; }
.brand .logo { height: 30px; width: auto; display: block; }
.brand .name { font-size: 1.15rem; color: var(--text); }
.brand .name span { color: var(--accent); }
.auth-logo { height: 56px; width: auto; margin-bottom: 8px; }

/* ===========================================================================
   App frame — floating rounded shell with gradient top bar
   =========================================================================== */
.frame {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  overflow: hidden;
  display: flex;
}
.frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  background: var(--grad);
  z-index: 6;
}

/* ---- Sidebar ---- */
.sidebar {
  width: 230px;
  flex: 0 0 230px;
  background: var(--surface);
  border-right: 1px solid #f0f2f6;
  padding: 30px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.side-brand .logo { height: 34px; width: auto; }
.side-brand .name { font-weight: 800; font-size: 1.08rem; letter-spacing: 0.3px; line-height: 1.2; }
.side-brand .name span { color: var(--accent); }
.side-sub { font-size: 0.56rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 600; }

.s-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 15px; border: 0; border-radius: 12px;
  background: transparent; color: var(--muted);
  font-family: inherit; font-weight: 600; font-size: 0.9rem;
  cursor: pointer; text-align: left;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: #f5f7fb; color: var(--text); }
.nav-item.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 10px 20px rgba(225, 29, 43, 0.30);
}
.nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 0.65rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-item.active .nav-badge { background: #fff; color: var(--accent); }

.stripes { margin-top: auto; width: 108px; opacity: 0.95; }

/* ---- Main column ---- */
.main {
  flex: 1; min-width: 0;
  background: var(--main-bg);
  padding: 26px 30px 44px;
  overflow-y: auto;
}

/* ---- Top bar ---- */
.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.search {
  flex: 0 1 340px; display: flex; align-items: center; gap: 9px;
  background: var(--surface); border-radius: 12px; padding: 10px 14px;
  box-shadow: var(--shadow); color: var(--muted);
}
.search input {
  border: 0; outline: 0; flex: 1; min-width: 0;
  font: inherit; font-size: 0.88rem; color: var(--text); background: transparent;
}
.search input::placeholder { color: #aab0bc; }
.now { margin-left: auto; color: var(--muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.icon-btn {
  position: relative; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: var(--surface); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow); flex: 0 0 auto;
  transition: color 0.15s;
}
.icon-btn:hover { color: var(--text); }
.bell-badge {
  position: absolute; top: -3px; right: -3px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 0.62rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--main-bg);
}
.tb-stack { flex: 0 0 auto; }
.add-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex: 0 0 auto;
  background: var(--accent); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 20px rgba(225, 29, 43, 0.35);
  transition: background 0.15s, transform 0.05s;
}
.add-btn:hover { background: var(--accent-hover); }
.add-btn:active { transform: scale(0.96); }

/* ---- Layout helpers ---- */
.center-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---- Cards ---- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.cal-card { padding: 14px; }
.auth-card { width: 100%; max-width: 420px; padding: 30px 28px; }
.stack > * + * { margin-top: 14px; }
.grad-top { position: relative; overflow: hidden; }
.grad-top::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--grad); }

h1 { font-size: 1.45rem; font-weight: 700; margin: 0 0 4px; }
h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 14px; }
.subtitle { color: var(--muted); margin: 0 0 20px; font-size: 0.9rem; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 0.98rem; font-weight: 700; }
.link-btn {
  border: 0; background: none; padding: 0; color: var(--accent);
  font-family: inherit; font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

/* ---- Forms ---- */
label { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"] {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 0.95rem; font-family: inherit; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

select.form-select {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 0.95rem; font-family: inherit; outline: none; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select.form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 10px; border: 1px solid var(--border);
  font-size: 0.92rem; font-weight: 600; font-family: inherit; cursor: pointer; transition: all 0.15s;
  background: var(--surface); color: var(--text);
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 8px 16px rgba(225, 29, 43, 0.25); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.full { width: 100%; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 7px 11px; font-size: 0.85rem; }
.btn.green { background: var(--green); color: #fff; border-color: transparent; }
.btn.green:hover { filter: brightness(1.05); background: var(--green); }
.btn.danger { background: #fff; color: var(--accent); border-color: var(--border); }
.btn.danger:hover { background: var(--accent-soft); }

/* ---- Tabs (auth) ---- */
.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 5px; border-radius: 12px; margin-bottom: 20px; }
.tabs button { flex: 1; padding: 9px; border: 0; border-radius: 9px; cursor: pointer; background: transparent; color: var(--muted); font-family: inherit; font-weight: 600; font-size: 0.92rem; }
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---- Messages ---- */
.msg { padding: 11px 13px; border-radius: 10px; font-size: 0.9rem; display: none; }
.msg.show { display: block; }
.msg.error { background: var(--accent-soft); color: #a11420; border: 1px solid rgba(225,29,43,0.30); }
.msg.success { background: var(--green-soft); color: #11703a; border: 1px solid rgba(28,161,77,0.30); }
.msg.info { background: var(--amber-soft); color: #8a5a07; border: 1px solid rgba(185,119,10,0.30); }

/* ---- Badges & pills ---- */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: capitalize; }
.badge.pending { background: var(--amber-soft); color: var(--amber); }
.badge.approved { background: var(--green-soft); color: var(--green); }
.badge.denied { background: var(--accent-soft); color: var(--accent); }
.badge.admin { background: var(--accent-soft); color: var(--accent); }
.badge.employee { background: var(--surface-2); color: var(--muted); }
.badge.today-badge { background: var(--accent-soft); color: var(--accent); margin-left: 6px; vertical-align: 2px; }

.pill {
  flex: 0 0 auto; padding: 4px 9px; border-radius: 7px;
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.07em;
}
.pill.in { background: var(--accent-soft); color: var(--accent); }
.pill.vacation { background: var(--vac-soft); color: var(--vac); }
.pill.sick { background: var(--amber-soft); color: var(--amber); }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid #f0f2f7; font-size: 0.88rem; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
td .actions, .pending-row .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { color: var(--muted); padding: 18px 4px; font-size: 0.9rem; }
.count-pill { font-size: 0.7rem; color: var(--muted); }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid #f0f2f7; }
.pending-row:last-child { border-bottom: 0; }
.who { color: var(--muted); font-size: 0.85rem; }

/* ---- Avatars ---- */
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 800; color: #fff; letter-spacing: 0.3px;
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar.sm { width: 24px; height: 24px; font-size: 0.58rem; }
.avatar.lg { width: 46px; height: 46px; font-size: 0.95rem; }
.avatar.me { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.avatar.more { background: var(--surface-2) !important; color: var(--muted); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar:not(:first-child) { margin-left: -7px; }

/* ===========================================================================
   Dashboard
   =========================================================================== */
.dash { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 26px 30px; overflow: hidden; }
.hero-text { flex: 1; min-width: 0; }
.hero h1 { font-size: 1.55rem; margin: 0; }
.hero h1 .hl { color: var(--accent); }
.hero p { color: var(--muted); font-size: 0.9rem; margin: 8px 0 18px; max-width: 430px; }
.hero-art { width: 250px; max-width: 40%; height: auto; flex: 0 0 auto; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.dash-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* profile card */
.profile-card { position: relative; }
.edit-fab {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.edit-fab:hover { background: var(--accent-soft); color: var(--accent); }
.prof-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.prof-name { font-weight: 700; font-size: 1rem; line-height: 1.3; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.prof-rows > div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.83rem; padding: 7px 0; border-bottom: 1px dashed #eef0f5; }
.prof-rows > div:last-child { border-bottom: 0; }
.prof-rows span { color: var(--muted); flex: 0 0 auto; }
.prof-rows strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* this-month card */
.month-big { display: flex; align-items: baseline; gap: 7px; margin-bottom: 10px; }
.month-big > span:first-child { font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--text); }
.bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1ca14d, #2bd56a); transition: width 0.4s ease; }
.mc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }

/* upcoming list */
.upcoming-card { min-width: 0; }
.up-row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 12px 4px; border: 0; border-bottom: 1px solid #f0f2f7;
  background: none; cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
  transition: background 0.12s;
}
.up-row:hover { background: #fafbfe; }
.up-row:last-child { border-bottom: 0; }
.up-date { flex: 0 0 auto; text-align: center; min-width: 44px; }
.up-num { display: block; font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.up-mon { display: block; font-size: 0.55rem; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); }
.up-info { flex: 1; min-width: 0; }
.up-title { display: block; font-weight: 600; font-size: 0.88rem; }
.up-sub { display: block; font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* mini calendar */
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-head strong { font-size: 0.95rem; font-weight: 700; }
.mini-nav { display: flex; gap: 4px; }
.mini-nav button {
  width: 26px; height: 26px; border-radius: 50%; border: 0;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  font-size: 0.95rem; line-height: 1; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center;
}
.mini-nav button:hover { background: var(--accent-soft); color: var(--accent); }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mini-dow { font-size: 0.6rem; font-weight: 700; color: var(--muted); padding: 2px 0 4px; }
.mini-day {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 6px 0 10px; font-size: 0.74rem; font-family: inherit; color: var(--text);
  border-radius: 9px; transition: background 0.12s;
}
.mini-day:hover { background: #f4f6fa; }
.mini-day.out { color: #c4cad6; }
.mini-day.today { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 6px 12px rgba(225, 29, 43, 0.3); }
.mini-day .dt {
  position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.mini-day .dt.other { background: #b9c0cd; }
.mini-day.today .dt { background: #fff; }

/* who's in today / pending cards */
.out-line { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #eef0f5; font-size: 0.78rem; color: var(--muted); }
.pend-count { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pend-count .big { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--accent); }

/* ===========================================================================
   Schedule view
   =========================================================================== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); transition: transform 0.05s; }
.stat:active { transform: scale(0.995); }
.stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 1.7rem; font-weight: 800; margin: 6px 0 6px; line-height: 1; }
.stat-sub { font-size: 0.8rem; color: var(--muted); min-height: 24px; display: flex; align-items: center; }

.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.cal-month-title { font-size: 1.25rem; font-weight: 800; }
.cal-nav { display: flex; gap: 8px; }
.cal-nav .btn { background: var(--surface); box-shadow: var(--shadow); border-color: transparent; }

.sched { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }

/* calendar grid (Google-style shared gridlines) */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow-row { margin-bottom: 6px; }
.dow { color: var(--muted); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 0 6px 4px; }
.month-grid { gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

.cell {
  position: relative; min-height: 106px; background: var(--surface);
  padding: 6px 7px; display: flex; flex-direction: column; gap: 4px;
  cursor: pointer; transition: background 0.12s; overflow: hidden;
}
.cell:hover { background: #f3f5f9; }
.cell.muted { background: #fafbfc; }
.cell.muted .num { color: #b8bec8; }
.cell.muted .evts { opacity: 0.6; }
.cell.selected { box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
/* drag-to-select range */
.month-grid { touch-action: pan-y; }
.month-grid, .cell { user-select: none; -webkit-user-select: none; }
.cell.range { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
.cell.range:hover { background: rgba(225, 29, 43, 0.16); }
.cell-top { display: flex; align-items: center; }
.cell .num { font-size: 0.76rem; font-weight: 600; color: var(--text); }
.cell.today .num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px; margin: -1px 0;
  background: var(--accent); color: #fff; border-radius: 999px; font-weight: 800;
}

/* attendee "events" (Google-style chips) */
.evts { display: flex; flex-direction: column; gap: 3px; overflow: hidden; min-width: 0; }
.evt {
  display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 0.7rem; line-height: 1.25;
  padding: 2px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text);
}
.evt .dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.evt-body { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evt.me { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.evt.more { background: transparent; color: var(--muted); padding: 0 4px; font-weight: 600; }
.evt.dim { opacity: 0.18; }
.att.dim { opacity: 0.3; }

/* day detail panel */
.muted-mini { font-size: 0.72rem; color: var(--muted); }
.panel { position: sticky; top: 4px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-weekday { font-size: 1.1rem; font-weight: 800; }
.panel-date { color: var(--muted); font-size: 0.88rem; }
.panel-count { text-align: right; }
.panel-count .big { font-size: 1.9rem; font-weight: 800; display: block; line-height: 1; color: var(--accent); }
.att-list { margin-top: 16px; display: flex; flex-direction: column; gap: 11px; max-height: 340px; overflow: auto; }
.att { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-hours { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* hours booking form */
.hours-row { display: flex; gap: 10px; }
.hours-row > div { flex: 1; }
.hours-row label { font-size: 0.75rem; }
input[type="time"] {
  width: 100%; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 0.95rem; font-family: inherit; outline: none;
}
input[type="time"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.presets { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  border-radius: 999px; padding: 4px 11px; font-size: 0.78rem; font-weight: 600; font-family: inherit; cursor: pointer;
}
.chip-btn:hover { background: var(--surface-2); color: var(--text); }
.form-actions { display: flex; gap: 10px; margin-top: 14px; }
.form-actions .btn { flex: 1; }
.yb-hours {
  background: var(--accent-soft); border: 1px solid rgba(225, 29, 43, 0.22);
  border-radius: 10px; padding: 11px 13px; font-size: 0.92rem; margin-bottom: 12px;
}
.yb-hours strong { color: var(--accent); }
.evt-t { font-weight: 700; opacity: 0.8; }
.evt.me .evt-t { opacity: 1; }

/* in / remote / vacation / sick picker (2×2 grid) */
.kind-select { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
.kind-opt {
  padding: 8px 4px; border: 1px solid var(--border); background: var(--surface);
  border-radius: 10px; cursor: pointer; font-size: 0.78rem; font-weight: 600; font-family: inherit; color: var(--muted);
}
.kind-opt:hover { background: var(--surface-2); }
.kind-opt.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.kind-opt[data-kind="vacation"].active { background: var(--vac-soft); border-color: var(--vac); color: var(--vac); }
.kind-opt[data-kind="sick"].active { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }

.evt.vacation { background: var(--vac-soft); color: var(--vac); font-weight: 700; }
.evt.sick { background: var(--amber-soft); color: var(--amber); font-weight: 700; }

.att-tag { font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.att-tag.vacation { color: var(--vac); }
.att-tag.sick { color: var(--amber); }

.yb-vacation { background: var(--vac-soft); border-color: rgba(13, 148, 136, 0.25); }
.yb-vacation strong { color: var(--vac); }
.yb-sick { background: var(--amber-soft); border-color: rgba(185, 119, 10, 0.25); }
.yb-sick strong { color: var(--amber); }

/* remote (working from home) — a 4th office-day kind */
.kind-opt[data-kind="remote"].active { background: var(--remote-soft); border-color: var(--remote); color: var(--remote); }
.evt.remote { background: var(--remote-soft); color: var(--remote); font-weight: 700; }
.att-tag.remote { color: var(--remote); }
.pill.remote { background: var(--remote-soft); color: var(--remote); }
.yb-remote { background: var(--remote-soft); border-color: rgba(37, 99, 235, 0.25); }
.yb-remote strong { color: var(--remote); }

/* company events / off-sites on the calendar */
.evt.is-event {
  background: var(--event-soft); color: var(--event); font-weight: 700;
  border-left: 3px solid var(--event); border-radius: 4px 6px 6px 4px;
}

/* event-type picker (event modal) */
.ev-kind-select .kind-opt.active { background: var(--event-soft); border-color: var(--event); color: var(--event); }
.ev-allday { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 0.88rem; color: var(--text); cursor: pointer; }
.ev-allday input { width: 16px; height: 16px; accent-color: var(--event); margin: 0; }

/* events block in the day panel */
.ev-section { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed #eef0f5; }
.ev-section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.ev-section-head .link-btn { font-size: 0.8rem; text-transform: none; letter-spacing: 0; }
.ev-row {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; margin-bottom: 6px; border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px; background: var(--event-soft); font-family: inherit; color: var(--text); cursor: pointer;
}
.ev-row:last-child { margin-bottom: 0; }
.ev-row[disabled] { cursor: default; }
.ev-row:not([disabled]):hover { filter: brightness(0.97); }
.ev-emoji { font-size: 1.1rem; flex: 0 0 auto; }
.ev-row-text { min-width: 0; flex: 1; }
.ev-title { display: block; font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta { display: block; font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-edit { color: var(--event); flex: 0 0 auto; display: inline-flex; }

.spinner { color: var(--muted); padding: 40px; text-align: center; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50; padding: 20px;
  background: rgba(20, 24, 31, 0.45); backdrop-filter: blur(2px);
  display: grid; place-items: center;
}
.modal { width: 100%; max-width: 420px; max-height: calc(100dvh - 36px); overflow-y: auto; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 28px; left: 50%; z-index: 80;
  transform: translateX(-50%) translateY(12px);
  background: #1f2733; color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
  opacity: 0; transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===========================================================================
   Responsive
   =========================================================================== */

/* Grids collapse first (narrow desktop / tablet) */
@media (max-width: 1180px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }
}
@media (max-width: 1000px) {
  .dash-grid { grid-template-columns: 1fr; }
  .sched { grid-template-columns: 1fr; }
  .panel { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* -------- Touch layout (≤960): sidebar becomes a fixed bottom tab bar ------ */
@media (max-width: 960px) {
  .frame { flex-direction: column; }

  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 30;
    width: 100%; height: auto; flex-direction: row; align-items: stretch; gap: 0;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px);
    border-right: 0; border-top: 1px solid var(--border);
    box-shadow: 0 -6px 20px rgba(35, 46, 84, 0.08);
    overflow: visible;
  }
  .side-brand, .sidebar .stripes { display: none; }

  .s-nav { flex-direction: row; width: 100%; max-width: 520px; margin: 0 auto; gap: 2px; }
  .nav-item {
    position: relative; flex: 1 1 0; min-width: 0;
    flex-direction: column; align-items: center; gap: 4px;
    padding: 7px 2px; border-radius: 12px; font-size: 0.6rem; line-height: 1.1;
    color: var(--muted);
  }
  .nav-item .ic { width: 21px; height: 21px; }
  .nav-item .txt { white-space: nowrap; }
  .nav-item:hover { background: transparent; color: var(--muted); }
  .nav-item.active { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
  .nav-item.active .txt { font-weight: 700; }
  .nav-badge { position: absolute; top: 2px; left: 50%; margin-left: 5px; transform: none; min-width: 16px; height: 16px; }

  /* main fills the screen; clear the bottom bar */
  .main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom, 0px)); }
  .now { display: none; }
  .hero-art { width: 190px; }

  /* keep the toast above the bottom bar */
  .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ----------------------------- Phones (≤640) ------------------------------ */
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .tb-stack { display: none; }
  .topbar { gap: 10px; margin-bottom: 16px; }
  .search { flex: 1 1 auto; padding: 10px 12px; }
  .btn.sm { padding: 7px 10px; font-size: 0.8rem; }

  /* iOS: 16px inputs stop the focus-zoom */
  input[type="text"], input[type="email"], input[type="password"],
  input[type="time"], input[type="date"], textarea, select, .search input { font-size: 16px; }

  /* week-summary tiles shrink to fit small screens */
  .rv-stats { gap: 10px; }
  .rv-row { gap: 8px; }

  h1 { font-size: 1.25rem; }
  .section { margin-top: 22px; }
  .card.pad { padding: 16px; }

  .hero { padding: 20px; text-align: center; }
  .hero-text { width: 100%; }
  .hero h1 { font-size: 1.3rem; }
  .hero p { margin: 8px auto 16px; }
  .hero-art { display: none; }
  .hero .btn { width: 100%; }

  .stats { gap: 10px; }
  .stat { padding: 13px; }
  .stat-value { font-size: 1.45rem; }
  .stat-sub { min-height: 0; }

  .cal-toolbar { gap: 8px; }
  .cal-card { padding: 10px; }
  .cal-month-title { font-size: 1.1rem; }
  .dow { padding: 0 2px 4px; font-size: 0.64rem; }

  /* Google-mobile month view: dots instead of cramped text chips */
  .cell { min-height: 64px; padding: 5px 4px; gap: 3px; }
  .cell .num { font-size: 0.72rem; }
  .cell.today .num { min-width: 20px; height: 20px; }
  .evts { flex-direction: row; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
  .evt { background: transparent !important; padding: 0; gap: 0; }
  .evt .evt-body { display: none; }
  .evt .dot { width: 9px; height: 9px; }
  .evt.more { padding: 0; }
  .evt.more .evt-body { display: inline; font-size: 0.6rem; color: var(--muted); }
  /* events have no dot — show them as a small square marker so they stay visible */
  .evt.is-event { border-left: 0; }
  .evt.is-event::before {
    content: ""; width: 9px; height: 9px; border-radius: 2px;
    background: var(--event); display: inline-block; flex: 0 0 auto;
  }

  /* pending requests: action buttons drop below the name and split the width */
  .pending-row { flex-wrap: wrap; }
  .pending-row .actions { width: 100%; }
  .pending-row .actions .btn { flex: 1; }

  /* team detail header */
  .detail-head { gap: 14px; }
  .dh-actions { width: 100%; }

  /* modal footer: full-width, easy-to-tap buttons */
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1; }
  .modal-foot #ae-remove, .modal-foot #rv-remove { flex-basis: 100%; margin-right: 0; order: 3; }
}

/* ------------------------- Small phones (≤380) ---------------------------- */
@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .stat-value { font-size: 1.3rem; }
  .cell { min-height: 56px; }
  .s-nav { gap: 0; }
  .nav-item { font-size: 0.55rem; padding: 7px 1px; }
}

/* ===========================================================================
   Profile pictures + admin user detail
   =========================================================================== */
.avatar.img { background-size: cover; background-position: center center; color: transparent; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.7rem; }

.av-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.av-btn:hover .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }

/* edit-profile modal */
.modal-avatar { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.modal-avatar-actions { display: flex; flex-direction: column; gap: 8px; }
.modal-foot { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; align-items: center; }

/* detail header */
.detail-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dh-avatar { position: relative; flex: 0 0 auto; }
.dh-upload {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--accent); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.dh-upload:hover { background: var(--accent-hover); }
.dh-info { flex: 1; min-width: 180px; }
.dh-info h1 { font-size: 1.3rem; margin: 0 0 4px; }
.dh-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.dh-badges { display: flex; gap: 6px; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* attendance metric tiles (wraps responsively, overrides .stats 4-col) */
.stats.metric-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 0; }

/* editable schedule list */
.sched-list { display: flex; flex-direction: column; }
.sched-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid #f0f2f7; }
.sched-row:last-child { border-bottom: 0; }
.sched-row.past { opacity: 0.6; }
.sched-when { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sched-date { font-weight: 600; font-size: 0.88rem; }

/* clickable name button in the team table / pending list */
.row-user {
  display: inline-flex; align-items: center; gap: 10px;
  border: 0; background: none; padding: 4px 6px; margin: -4px -6px;
  border-radius: 9px; cursor: pointer; font: inherit; color: var(--text); text-align: left;
}
.row-user:hover { background: var(--surface-2); }
.row-user > span { font-weight: 500; }
.pending-row .row-user { flex: 1; min-width: 0; }

/* sign out inside the profile modal */
.modal-signout { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

/* ===========================================================================
   Weekly reviews
   =========================================================================== */
textarea {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font-size: 0.95rem; font-family: inherit;
  outline: none; resize: vertical; min-height: 88px; line-height: 1.45;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* week-summary tiles */
.rv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }

/* overview rows */
.rv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #f0f2f7; }
.rv-row:last-child { border-bottom: 0; }
.rv-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rv-person-text { min-width: 0; }
.rv-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-note { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-action { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.rv-note-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched-when > div { min-width: 0; }

/* rating badge (in lists) */
.rating-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 30px; padding: 0 7px; border-radius: 8px;
  font-weight: 800; font-size: 0.98rem; flex: 0 0 auto;
}
.rating-badge.low  { background: var(--accent-soft); color: var(--accent); }
.rating-badge.mid  { background: var(--amber-soft);  color: var(--amber); }
.rating-badge.high { background: var(--green-soft);  color: var(--green); }

/* 1–10 picker (in the review modal) */
.rating-scale { display: flex; gap: 6px; flex-wrap: wrap; }
.rate-btn {
  flex: 1 1 0; min-width: 30px; padding: 10px 0; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); border-radius: 9px;
  font-family: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.12s;
}
.rate-btn:hover { background: var(--surface-2); color: var(--text); }
.rate-btn.active { color: #fff; }
.rate-btn.active.low  { background: var(--accent); border-color: var(--accent); }
.rate-btn.active.mid  { background: var(--amber);  border-color: var(--amber); }
.rate-btn.active.high { background: var(--green);  border-color: var(--green); }
.rating-hint { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.72rem; color: var(--muted); }

/* employee's "Your latest review" dashboard card */
.rating-badge.lg { min-width: 52px; height: 52px; border-radius: 12px; font-size: 1.55rem; }
.rating-badge.lg .rc-outof { font-size: 0.7rem; font-weight: 700; opacity: 0.7; margin-left: 1px; }
.rc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.rc-meta { min-width: 0; }
.rc-week { font-weight: 700; font-size: 0.95rem; }
.rc-note {
  font-size: 0.86rem; color: var(--text); white-space: pre-wrap; line-height: 1.5;
  overflow-wrap: anywhere; max-height: 300px; overflow-y: auto;
}
.review-card .link-btn { margin-top: 10px; }

/* employee's review history modal */
.myr-list { display: flex; flex-direction: column; }
.myr-row { padding: 12px 0; border-bottom: 1px solid #f0f2f7; }
.myr-row:first-child { padding-top: 0; }
.myr-row:last-child { border-bottom: 0; }
.myr-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.myr-week { font-weight: 600; font-size: 0.9rem; }
.myr-note { margin: 0; font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ===========================================================================
   Task board (Kanban)
   =========================================================================== */
.th-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* segmented "Everyone / Just me" toggle */
.seg { display: inline-flex; background: var(--bg-2); padding: 4px; border-radius: 10px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-family: inherit; font-weight: 600; font-size: 0.84rem; padding: 7px 13px; border-radius: 8px;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* board: four columns that scroll horizontally when they don't fit */
.kanban {
  display: flex; gap: 14px; align-items: flex-start;
  overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity;
}
.kanban-col {
  flex: 1 1 0; min-width: 248px; scroll-snap-align: start;
  background: var(--surface-2); border-radius: 14px; padding: 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.kanban-col.drop-target { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-soft); }

.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 2px; }
.kcol-title { font-weight: 700; font-size: 0.9rem; }
.kdot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.kcol-head.inbound { color: var(--muted); }
.kcol-head.in_progress { color: var(--amber); }
.kcol-head.awaiting_review { color: var(--vac); }
.kcol-head.completed { color: var(--green); }
.kcol-title, .kcol-count { color: var(--text); }
.kcol-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--surface); color: var(--muted); font-size: 0.72rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.kcol-add {
  margin-left: auto; width: 26px; height: 26px; padding: 0; border-radius: 8px;
  border: 0; background: var(--surface); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.kcol-add:hover { color: var(--accent); }
.kcol-body { display: flex; flex-direction: column; gap: 9px; min-height: 56px; }
.kcol-empty {
  color: var(--muted); font-size: 0.82rem; text-align: center;
  padding: 16px 8px; border: 1px dashed var(--border); border-radius: 10px;
}

/* cards */
.kanban-card {
  background: var(--surface); border-radius: 11px; padding: 11px 12px;
  box-shadow: 0 2px 6px rgba(43, 52, 84, 0.06); border-left: 3px solid var(--border);
  transition: box-shadow 0.12s, transform 0.05s;
}
.kanban-card[draggable="true"] { cursor: grab; }
.kanban-card[draggable="true"]:active { cursor: grabbing; }
.kanban-card:hover { box-shadow: 0 6px 16px rgba(43, 52, 84, 0.12); }
.kanban-card.dragging { opacity: 0.45; }
.kanban-card.status-in_progress { border-left-color: var(--amber); }
.kanban-card.status-awaiting_review { border-left-color: var(--vac); }
.kanban-card.status-completed { border-left-color: var(--green); }
.kanban-card.status-completed .kc-title { color: var(--muted); }

.kc-main { cursor: pointer; }
.kc-title { font-weight: 600; font-size: 0.9rem; line-height: 1.35; overflow-wrap: anywhere; }
.kc-desc {
  margin-top: 4px; font-size: 0.8rem; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-foot { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.kc-assignee { display: flex; align-items: center; gap: 7px; min-width: 0; }
.kc-who { font-size: 0.76rem; color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-actions { display: flex; align-items: center; gap: 5px; margin-left: auto; flex: 0 0 auto; }
.kc-btn {
  height: 28px; min-width: 28px; padding: 0 7px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 0.74rem; transition: all 0.12s;
}
.kc-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.kc-btn.done { color: var(--green); border-color: var(--green-soft); }
.kc-btn.done:hover { background: var(--green); color: #fff; border-color: var(--green); }
.kc-btn.del:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.kc-wait { font-size: 0.72rem; font-weight: 700; color: var(--amber); white-space: nowrap; }

/* task modal */
.tk-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-readonly { font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; padding: 2px 0; }
.tk-readonly.strong { font-weight: 700; font-size: 1.02rem; }
.badge.stage-inbound { background: var(--surface-2); color: var(--muted); }
.badge.stage-in_progress { background: var(--amber-soft); color: var(--amber); }
.badge.stage-awaiting_review { background: var(--vac-soft); color: var(--vac); }
.badge.stage-completed { background: var(--green-soft); color: var(--green); }

/* dashboard "your tasks" card */
.tk-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tk-chip { border-radius: 9px; padding: 8px 4px; text-align: center; background: var(--surface-2); }
.tk-chip-n { display: block; font-weight: 800; font-size: 1.1rem; line-height: 1; }
.tk-chip-l { display: block; font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-top: 3px; }
.tk-chip.stage-inbound { color: var(--muted); }
.tk-chip.stage-in_progress { background: var(--amber-soft); color: var(--amber); }
.tk-chip.stage-awaiting_review { background: var(--vac-soft); color: var(--vac); }
.tk-chip.stage-completed { background: var(--green-soft); color: var(--green); }
.tk-mini-note { margin-top: 10px; }

/* due-date pill on cards */
.kc-due { display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 0.74rem; font-weight: 700; color: var(--muted); }
.kc-due .ic { width: 14px; height: 14px; flex: 0 0 auto; }
.kc-due.soon { color: var(--amber); }
.kc-due.overdue { color: var(--accent); }

/* expand / collapse a card to read the full task */
.kc-expand svg { transition: transform 0.15s; }
.kanban-card.expanded .kc-expand svg { transform: rotate(180deg); }
.kanban-card.expanded .kc-desc { -webkit-line-clamp: unset; overflow: visible; }
.kc-actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 5px; }

/* board filter bar (assignee / label / due) */
.board-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 2px 0 16px; }
.board-filters .bf-ic { color: var(--muted); display: inline-flex; }
.bf { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.bf select {
  font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--text);
  padding: 6px 26px 6px 9px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.bf select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#bf-clear { margin-left: auto; }

/* colored label pills */
.kc-labels { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.kc-labels.in-modal { margin: 3px 0 0; }
.kc-label {
  display: inline-flex; align-items: center; line-height: 1.6;
  font-size: 0.61rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 8px; border-radius: 999px;
  color: var(--lc); background: color-mix(in srgb, var(--lc) 16%, transparent);
}

/* checklist / comment count badges on the card face */
.kc-meta { display: flex; align-items: center; gap: 12px; margin-top: 9px; }
.kc-meta-i { display: inline-flex; align-items: center; gap: 4px; font-size: 0.73rem; font-weight: 700; color: var(--muted); }
.kc-meta-i .ic { width: 14px; height: 14px; }
.kc-meta-i.done { color: var(--green); }

/* label picker inside the modal */
.tk-modal { max-width: 560px; }
.tk-labels { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 4px; }
.lbl-pick {
  font-family: inherit; font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  color: var(--lc); background: transparent; border: 1.5px solid color-mix(in srgb, var(--lc) 40%, transparent);
  opacity: 0.7; transition: all 0.12s;
}
.lbl-pick:hover { opacity: 1; }
.lbl-pick.on { opacity: 1; color: #fff; background: var(--lc); border-color: var(--lc); }

/* checklist + comments sections inside the card modal */
.tk-extras { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.tk-section { border-top: 1px solid var(--border); padding-top: 16px; }
.tk-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tk-sec-head h3 { margin: 0; font-size: 0.92rem; display: inline-flex; align-items: center; gap: 7px; }
.tk-sec-head h3 .ic { width: 16px; height: 16px; color: var(--muted); }
.tk-sec-prog {
  margin-left: auto; font-size: 0.74rem; font-weight: 800; color: var(--muted);
  background: var(--surface-2); border-radius: 999px; padding: 2px 9px;
}

/* checklist */
.ck-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-bottom: 12px; }
.ck-bar span { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width 0.2s; }
.ck-list { display: flex; flex-direction: column; gap: 4px; }
.ck-item { display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 8px; }
.ck-item:hover { background: var(--surface-2); }
.ck-box {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--surface); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.ck-box .ic { width: 13px; height: 13px; }
.ck-box:disabled { cursor: default; }
.ck-item.done .ck-box { background: var(--green); border-color: var(--green); }
.ck-text { flex: 1; font-size: 0.86rem; line-height: 1.4; overflow-wrap: anywhere; }
.ck-item.done .ck-text { color: var(--muted); text-decoration: line-through; }
.ck-del {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.ck-item:hover .ck-del { opacity: 1; }
.ck-del:hover { background: var(--accent-soft); color: var(--accent); }
.ck-add { display: flex; gap: 8px; margin-top: 10px; }
.ck-add input { flex: 1; }

/* comments */
.cm-list { display: flex; flex-direction: column; gap: 14px; }
.cm-item { display: flex; gap: 10px; align-items: flex-start; }
.cm-body { flex: 1; min-width: 0; }
.cm-meta { display: flex; align-items: baseline; gap: 8px; }
.cm-who { font-weight: 700; font-size: 0.84rem; }
.cm-when { font-size: 0.72rem; color: var(--muted); }
.cm-text { font-size: 0.86rem; line-height: 1.45; margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-del {
  flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer; opacity: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.cm-item:hover .cm-del { opacity: 1; }
.cm-del:hover { background: var(--accent-soft); color: var(--accent); }
.cm-add { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cm-add .btn { align-self: flex-end; }

/* attachments */
.at-list { display: flex; flex-direction: column; gap: 8px; }
.at-item { display: flex; align-items: center; gap: 10px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; }
.at-item:hover { background: var(--surface-2); }
.at-thumb {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--muted); text-decoration: none;
}
.at-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-thumb .ic { width: 20px; height: 20px; }
.at-body { flex: 1; min-width: 0; }
.at-name { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-name:hover { color: var(--accent); text-decoration: underline; }
.at-meta { font-size: 0.72rem; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-act {
  flex: 0 0 auto; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.at-act:hover { background: var(--surface-2); color: var(--text); }
.at-del:hover { background: var(--accent-soft); color: var(--accent); }
.at-add { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.at-hint { white-space: nowrap; }

@media (max-width: 640px) {
  .th-actions { width: 100%; }
  .th-actions .btn { flex: 1; }
  .board-filters { gap: 8px 12px; }
  .bf { font-size: 0.74rem; }
  .ck-del, .cm-del { opacity: 1; }
}

/* ===== Events page ===== */
.ev-section { margin-bottom: 26px; }
.ev-sec-head { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.ev-sec-head h2 { margin: 0; font-size: 1.05rem; }
.ev-count { font-size: 0.78rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ev-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.ev-card.clickable { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.ev-card.clickable:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(43, 52, 84, 0.12); }
.ev-card.clickable:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.ev-img { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.ev-kind { align-self: flex-start; font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; color: var(--lc, var(--muted)); background: color-mix(in srgb, var(--lc, var(--muted)) 15%, transparent); }
.ev-kind-event { --lc: var(--event); }
.ev-kind-offsite { --lc: var(--info); }
.ev-kind-holiday { --lc: var(--amber); }
.ev-kind-social { --lc: var(--green); }
.ev-title { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.ev-lines { display: flex; flex-direction: column; gap: 4px; }
.ev-line { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text); }
.ev-line .ic { color: var(--muted); flex: 0 0 auto; }
.ev-notes { margin: 4px 0 0; font-size: 0.85rem; line-height: 1.45; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

/* dashboard "Upcoming events" list */
.de-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); }
.de-row:first-child { border-top: 0; padding-top: 2px; }
.de-date { flex: 0 0 auto; width: 42px; text-align: center; display: flex; flex-direction: column; line-height: 1; }
.de-num { font-size: 1.15rem; font-weight: 800; }
.de-mon { font-size: 0.62rem; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
.de-info { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.de-title { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.de-sub { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* event modal image field */
.ev-image { display: flex; gap: 14px; align-items: center; margin-top: 4px; }
.ev-img-preview { flex: 0 0 auto; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.ev-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.ev-img-none { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 0.7rem; color: var(--muted); }
.ev-img-none .ic { width: 22px; height: 22px; }
.ev-img-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
