/* ============================================================
   HR Management System — global styles
   Brand: deep navy sidebar, blue accents, light slate canvas
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Brand */
  --navy-grad-a: #0f172a;
  --navy-grad-b: #0e7490;
  --navy-deep: #0f172a;
  --blue: #2f6fed;
  --blue-600: #2f6fed;
  --blue-700: #1d4ed8;
  --blue-500: #4f8df7;
  --blue-soft: #eaf2ff;
  --blue-soft-2: #f5f8ff;
  --coral: #f97316;
  --mustard: #f59e0b;
  --teal: #06b6d4;

  /* Canvas */
  --bg: #f6f8fb;
  --bg-2: #eef4f8;
  --card: #ffffff;
  --line: #e6ebf2;
  --line-strong: #d7e0eb;

  /* Text */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  /* Status */
  --green: #16a34a;
  --green-bg: #eaf8f0;
  --red: #dc2626;
  --red-bg: #fdeaea;
  --amber: #d97706;
  --amber-bg: #fdf2dc;
  --purple: #7c3aed;
  --purple-bg: #f1ecff;
  --info: #2563eb;
  --info-bg: #eaf2ff;

  --display-font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 14px 34px rgba(15, 23, 42, .075);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, .20);
  --sidebar-w: 248px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#root {
  height: 100%;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: rgba(37, 99, 235, .18); }

/* Scrollbars */
.scroll::-webkit-scrollbar, .app-main::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-thumb, .app-main::-webkit-scrollbar-thumb {
  background: #d3dbe8; border-radius: 20px; border: 3px solid transparent; background-clip: padding-box;
}
.scroll::-webkit-scrollbar-thumb:hover, .app-main::-webkit-scrollbar-thumb:hover { background: #b9c4d6; background-clip: padding-box; }

/* ============================================================ App layout */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(90deg, var(--navy-grad-a) 0%, var(--navy-grad-b) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 20px;
  position: relative;
}
.sidebar::after {
  content: ''; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: rgba(255, 255, 255, .08);
}
.brand { display: flex; align-items: center; gap: 13px; padding: 6px 6px 24px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: #fff;
  display: grid; place-items: center; overflow: hidden;
  position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.brand-mark::after { content: ''; position: absolute; inset: 0; border-radius: 14px; border: 1px solid rgba(255,255,255,.5); }
.brand-mark span { color: #fff; font-weight: 800; font-size: 23px; line-height: 1; letter-spacing: -.5px; }
.brand-mark img { width: 36px; height: 36px; object-fit: contain; display: block; }
.brand-name { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.brand-word { font-size: 19px; font-weight: 800; line-height: 1.08; color: #f8fbff; letter-spacing: -.3px; }
.brand-word-2 { color: rgba(255,255,255,.86); }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
  color: rgba(255,255,255,.88); font-size: 14.5px; font-weight: 700;
  transition: background .15s, color .15s;
  text-align: left; width: 100%;
}
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.16); color: #fff; }
.nav-item.active {
  background: rgba(255,255,255,.24);
  color: #fff;
  box-shadow: 0 10px 24px rgba(35, 21, 94, .20);
  backdrop-filter: blur(12px);
}
.nav-sep { height: 1px; background: rgba(255,255,255,.10); margin: 16px 12px; }
.sidebar-foot { margin-top: auto; padding: 18px 10px 4px; font-size: 11.5px; color: rgba(255,255,255,.72); line-height: 1.6; }

/* ---------- Main ---------- */
.app-main {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, .10), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f4f7fb 100%);
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 18px 40px;
  background: rgba(248, 250, 252, .90);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-family: var(--display-font); font-size: 24px; font-weight: 800; color: var(--navy-deep); letter-spacing: -.3px; flex: none; }
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 84px;
  height: 40px;
  padding: 0 13px 0 11px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 800;
  flex: none;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.back-btn:hover:not(:disabled) {
  border-color: rgba(31, 111, 235, .36);
  background: var(--blue-soft-2);
  color: var(--blue);
  box-shadow: 0 6px 16px rgba(16, 33, 70, .07);
  transform: translateX(-1px);
}
.back-btn:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.search {
  flex: 1; max-width: 460px; margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 11px 16px; color: var(--faint);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.search input { border: none; outline: none; flex: 1; font-size: 14px; color: var(--ink); background: none; }
.search input::placeholder { color: var(--faint); }

.bell { position: relative; width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink-2); }
.bell:hover { background: var(--bg-2); }
.bell .dot { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.topbar-divider { width: 1px; height: 30px; background: var(--line-strong); }
.profile { display: flex; align-items: center; gap: 11px; padding: 5px 10px 5px 6px; border-radius: 12px; min-width: 0; }
.profile:hover { background: #fff; }
.profile .pfp { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--bg-2); }
.profile .pname { font-size: 13.5px; font-weight: 700; color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding: 32px 48px 56px; max-width: 1640px; margin: 0 auto; width: 100%; }
.topbar > .topbar-inner { max-width: 1640px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 22px; }

/* page header (icon + title + subtitle, right meta) */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-head .ph-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--blue); background: var(--blue-soft); }
.page-head h1 { margin: 0; font-family: var(--display-font); font-size: 30px; font-weight: 800; color: var(--navy-deep); letter-spacing: -.4px; }
.page-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.page-head .ph-meta { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; font-weight: 600; background: #fff; border: 1px solid var(--line-strong); padding: 9px 14px; border-radius: 11px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); font-weight: 600; margin-top: 5px; }
.breadcrumb b { color: var(--muted); font-weight: 600; }

/* ============================================================ Cards */
.card { background: #ffffff !important; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head .ch-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.card-head h3 { margin: 0; font-family: var(--display-font); font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: -.25px; }
.card-head .ch-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-head .ch-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.kebab { width: 30px; height: 30px; border-radius: 8px; color: var(--faint); display: grid; place-items: center; }
.kebab:hover { background: var(--bg-2); color: var(--ink-2); }

/* ============================================================ Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 700; padding: 11px 18px; border-radius: 11px; transition: all .15s; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 18px rgba(37,99,235,.26); }
.btn-primary:hover { background: var(--blue-700); }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid var(--line-strong); }
.btn-outline:hover { border-color: var(--blue); background: var(--blue-soft-2); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(21,160,90,.28); }
.btn-green:hover { filter: brightness(.95); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* toggle switch */
.switch { width: 40px; height: 23px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex: none; }
.switch > span { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--blue); }
.switch.on > span { transform: translateX(17px); }
.switch.sm { width: 34px; height: 20px; }
.switch.sm > span { width: 16px; height: 16px; }
.switch.sm.on > span { transform: translateX(14px); }

/* last-synced indicator */
.synced { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line-strong); border-radius: 11px; padding: 9px 13px; transition: all .15s; }
.synced b { color: var(--ink-2); font-weight: 700; }
.synced:hover { border-color: var(--blue); color: var(--blue); }
.synced:hover b, .synced:hover svg { color: var(--blue); }
.synced svg { color: var(--faint); transition: transform .4s; }
.synced:hover svg { transform: rotate(180deg); }
.synced-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21,160,90,.18); }

/* staggered card entrance (transform-only so captures/print stay visible) */
@keyframes cardRise { from { transform: translateY(20px); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .screen-enter .dcard { animation: cardRise .5s cubic-bezier(.2,.8,.2,1) both; }
  .screen-enter .dcard:nth-child(1) { animation-delay: .03s; }
  .screen-enter .dcard:nth-child(2) { animation-delay: .09s; }
  .screen-enter .dcard:nth-child(3) { animation-delay: .15s; }
  .screen-enter .dcard:nth-child(4) { animation-delay: .21s; }
}

/* upcoming event rows */
.event-row { display: flex; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.event-row:hover { border-color: var(--blue); box-shadow: 0 6px 16px rgba(16,33,70,.07); transform: translateY(-1px); }

/* ---- Calendar QA: legend, segmented, insights, tasks, attendees ---- */
.seg-lg button { padding: 9px 22px; font-size: 14px; }
.cal-legend { display: grid; grid-template-columns: repeat(3, auto); gap: 9px 18px; justify-content: start; }
.cal-legend-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cal-legend-item i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.insight-tile { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, transform .15s; }
.insight-tile:hover { border-color: var(--blue); transform: translateY(-1px); }
.upcoming-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; transition: all .15s; }
.upcoming-row:hover { border-color: var(--blue); background: var(--blue-soft-2); }
.up-date { width: 40px; height: 40px; flex: none; border-radius: 9px; border: 1.5px solid var(--line-strong); border-left-width: 3px; display: grid; place-items: center; text-align: center; }
.task-row { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; transition: border-color .15s, background .15s; }
.task-row:hover { border-color: var(--blue); background: var(--blue-soft-2); }
.task-check { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; flex: none; }
.pri-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.attendee-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px 3px 3px; }

/* link-button inside cards — standardized across all dashboard cards */
.card-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-strong); background: #fff; color: var(--blue); font-weight: 700; font-size: 13.5px; transition: all .15s; }
.card-link svg { width: 16px; height: 16px; }
.card-link:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(37,99,235,.26); }
.card-link:hover svg { color: #fff; }

/* equal-height dashboard cards with bottom-aligned action */
.dcard { display: flex; flex-direction: column; }
.dcard > .card-link:last-child { margin-top: auto; }

/* compact "View All" pill in card headers */
.viewall { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--blue); padding: 6px 12px; border-radius: 8px; background: var(--blue-soft-2); transition: all .15s; }
.viewall:hover { background: var(--blue); color: #fff; }
.viewall svg { transition: transform .15s; }
.viewall:hover svg { transform: translateX(2px); }

/* gradient progress bar */
.progress.grad { height: 10px; }
.progress.grad > span { background: linear-gradient(90deg, #2f6be0, #15a05a); }

/* ============================================================ Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; line-height: 1.4; white-space: nowrap; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.blue { background: var(--info-bg); color: var(--info); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.badge.slate { background: #eef1f6; color: var(--muted); }

/* segmented tabs */
.seg { display: inline-flex; background: #eef2f8; padding: 4px; border-radius: 12px; gap: 3px; }
.seg button { padding: 8px 18px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--muted); transition: all .15s; }
.seg button.active { background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.seg.light button.active { background: #fff; color: var(--blue); box-shadow: var(--shadow); }

/* chip filters */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { padding: 7px 15px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-strong); background: #fff; color: var(--muted); transition: all .15s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.active.green { background: var(--green); border-color: var(--green); }
.chip.active.amber { background: var(--amber); border-color: var(--amber); }
.chip.active.red { background: var(--red); border-color: var(--red); }

/* ============================================================ Progress */
.progress { height: 8px; border-radius: 99px; background: #eaeef5; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--blue); transition: width .5s ease; }
.progress.green > span { background: var(--green); }

/* ============================================================ Tables */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #ffffff; white-space: nowrap; }
table.tbl td { padding: 14px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); background: #ffffff; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl tbody tr { background: #ffffff; transition: box-shadow .12s; }
table.tbl.hover tbody tr:hover { background: #ffffff; box-shadow: inset 0 0 0 9999px rgba(37,99,235,.025); cursor: pointer; }
.tbl-wrap { background: #ffffff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }

/* mini-calendar */
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); }
.mcal .dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 6px 0 10px; }
.mcal .cell { text-align: center; font-size: 13px; font-weight: 600; padding: 7px 0; color: var(--ink-2); position: relative; border-radius: 9px; }
.mcal .cell.muted { color: #c4ccd9; }
.mcal .cell.today { background: var(--blue); color: #fff; border-radius: 10px; }
.mcal .cell.clickable { transition: background .12s, box-shadow .12s; }
.mcal .cell.clickable:hover { background: var(--blue-soft-2); box-shadow: inset 0 0 0 1.5px var(--blue); border-radius: 9px; }
.mcal .cell.clickable.today:hover { background: var(--blue-700); box-shadow: none; }
.mcal .cell .mdot { width: 5px; height: 5px; border-radius: 50%; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); }

/* legend */
.legend { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* utility */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.grid { display: grid; }
.stat-num { font-size: 28px; font-weight: 800; color: var(--navy-deep); letter-spacing: -.5px; }

/* fade-in for screen transitions */
@keyframes fadeUp { from { transform: translateY(9px); } to { transform: none; } }
.screen-enter { animation: fadeUp .3s ease both; }
@media (prefers-reduced-motion: reduce) { .screen-enter { animation: none; } }

/* image placeholder (maps etc.) */
.ph-img { position: relative; border-radius: 12px; overflow: hidden; background:
  repeating-linear-gradient(45deg, #eef2f8 0 12px, #e7ecf4 12px 24px); border: 1px solid var(--line); }
.ph-img .ph-tag { position: absolute; inset: 0; display: grid; place-items: center; font-family: ui-monospace, 'SF Mono', monospace; font-size: 11px; color: #9aa6ba; letter-spacing: .5px; }

/* quick-action buttons (home) */
.qa-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 700; color: var(--ink); transition: all .15s; }
.qa-btn:hover { border-color: var(--blue); background: var(--blue-soft-2); transform: translateX(2px); }
.qa-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
/* primary quick action (Clock In Now) */
.qa-btn.primary { background: linear-gradient(135deg, #1aa85a, #138a48); border-color: transparent; color: #fff; box-shadow: 0 8px 18px rgba(21,160,90,.30); }
.qa-btn.primary .qa-ic { background: rgba(255,255,255,.22); color: #fff; }
.qa-btn.primary svg { color: #fff; }
.qa-btn.primary:hover { background: linear-gradient(135deg, #1aa85a, #138a48); transform: translateY(-2px); filter: brightness(1.05); }

/* info tiles (clock / personal) */
.info-tile { display: flex; gap: 12px; align-items: flex-start; }
.info-tile .it-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.info-tile .it-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.info-tile .it-value { font-size: 14px; color: var(--ink); font-weight: 700; margin-top: 2px; }

/* field rows */
.field-grid { display: grid; gap: 22px 28px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.field label .req { color: var(--red); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 11px;
  font-size: 14px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.field .err-msg { color: var(--red); font-size: 12px; margin-top: 6px; font-weight: 600; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--red); }
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: 11px; padding: 16px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 13.5px; }
.dropzone:hover { border-color: var(--blue); background: var(--blue-soft-2); }

/* clock in/out big buttons */
.clockbtn { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px; border-radius: 14px; font-size: 19px; font-weight: 800; color: #fff; transition: all .15s; }
.clockbtn.in { background: linear-gradient(135deg, #1aa85a, #138a48); box-shadow: 0 10px 24px rgba(21,160,90,.32); }
.clockbtn.out { background: linear-gradient(135deg, #ef5350, #d94340); box-shadow: 0 10px 24px rgba(217,67,64,.30); }
.clockbtn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.03); }
.clockbtn:disabled { background: #e7ebf2; color: #aab4c5; box-shadow: none; cursor: not-allowed; }
[data-theme="dark"] .clockbtn:disabled { background: #1c2840; color: #5b6781; }

/* clock helper text under buttons */
.clock-helper { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 2px 0; }

/* work-status banner */
.status-banner { display: flex; gap: 13px; align-items: flex-start; border-radius: 14px; padding: 16px 16px; border: 1px solid var(--line); }
.status-banner.green { background: var(--green-bg); border-color: rgba(21,160,90,.28); }
.status-banner.amber { background: var(--amber-bg); border-color: rgba(217,119,6,.30); }
.status-banner.slate { background: var(--bg-2); border-color: var(--line-strong); }
.sb-eyebrow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sb-label { font-size: 21px; font-weight: 800; letter-spacing: -.3px; margin: 1px 0 3px; }
.sb-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.sb-pulse { position: relative; width: 13px; height: 13px; border-radius: 50%; flex: none; margin-top: 5px; }
.sb-pulse > span { position: absolute; inset: 0; border-radius: 50%; opacity: .5; animation: sbpulse 2s ease-out infinite; }
@keyframes sbpulse { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(2.4); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sb-pulse > span { animation: none; } }

/* device trust strip */
.device-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 13px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }

/* attendance policy rows reuse qa-ic */

/* premium office map */
.office-map { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.map-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; color: var(--ink); background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.06); padding: 4px 9px; border-radius: 99px; box-shadow: 0 2px 6px rgba(16,33,70,.12); line-height: 1; }
.map-chip > span { width: 7px; height: 7px; border-radius: 50%; }
.map-chip-office { top: 10px; right: 10px; }
.map-chip-you { bottom: 10px; left: 10px; }
[data-theme="dark"] .map-chip { background: rgba(22,33,60,.92); color: var(--ink); border-color: rgba(255,255,255,.1); }

/* today activity log */
.actlog { display: flex; flex-direction: column; }
.actlog-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); position: relative; }
.actlog-row:last-child { border-bottom: none; }
.actlog-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.live-pill { font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--green); padding: 2px 6px; border-radius: 5px; }
.empty-state { text-align: center; padding: 26px 10px; }

/* count pill (Leave Pending button) */
.count-pill { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; }

/* portfolio access cards */
.portfolio-card { text-align: left; background: var(--card); border: 1px solid var(--line-strong); border-radius: 16px; padding: 18px 20px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.portfolio-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue); }
.portfolio-card.active { background: linear-gradient(135deg, #1f53c9, #0a1c44); border-color: transparent; box-shadow: 0 12px 28px rgba(31,83,201,.32); }
.portfolio-card.active .pf-name, .portfolio-card.active .pf-staff { color: #fff; }
.portfolio-card.active .pf-staff { opacity: .85; }
.portfolio-card.locked { cursor: not-allowed; background: var(--bg-2); border-style: dashed; }
.portfolio-card.locked:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.portfolio-card.locked .pf-name, .portfolio-card.locked .pf-staff { color: var(--muted); }
.pf-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.pf-name { font-size: 15.5px; font-weight: 800; color: var(--navy-deep); letter-spacing: -.2px; }
.pf-staff { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
.pf-view { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 12px; font-weight: 700; color: #fff; opacity: .92; }
.pf-view:hover { opacity: 1; text-decoration: underline; }

/* coaching status track */
.coach-track { height: 7px; border-radius: 99px; background: #eef2f8; overflow: hidden; }
[data-theme="dark"] .coach-track { background: #1c2840; }
.coach-track > span { display: block; height: 100%; border-radius: 99px; transition: width .5s ease; }

/* best-staff feature card */
.best-card { background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.best-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* BioTime punch timeline */
.punch-timeline { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.punch-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.punch-row:last-child { border-bottom: none; }
.punch-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* BioTime sync settings */
.bt-stat { background: #ffffff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-align: center; }
.bt-stat b { font-size: 24px; font-weight: 800; color: var(--navy-deep); display: block; }
.bt-log { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: flex-start; }
.bt-log:last-child { border-bottom: none; }
.bt-log .lvl { font-size: 9.5px; font-weight: 800; padding: 2px 7px; border-radius: 5px; flex: none; text-transform: uppercase; letter-spacing: .03em; }
.bt-log .lvl.info { background: var(--blue-soft); color: var(--blue); }
.bt-log .lvl.warn { background: var(--amber-bg); color: var(--amber); }
.bt-log .lvl.error { background: var(--red-bg); color: var(--red); }

/* skeleton loading placeholder */
.skel { display: inline-block; background: linear-gradient(90deg, var(--bg-2) 25%, #e9edf4 37%, var(--bg-2) 63%); background-size: 400% 100%; animation: skelshimmer 1.4s ease infinite; }
[data-theme="dark"] .skel { background: linear-gradient(90deg, #1c2840 25%, #243149 37%, #1c2840 63%); background-size: 400% 100%; }
@keyframes skelshimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ============================================================
   Responsive safety nets — desktop layout (>1080px) is UNCHANGED.
   Below that we only prevent clipping: tables scroll, dense grids
   collapse to one column, sidebar narrows. No business logic touched.
   ============================================================ */
/* hamburger + drawer-close + scrim are desktop-hidden by default */
.hamburger, .drawer-close { display: none; background: none; border: none; cursor: pointer; color: var(--ink-2); }
.drawer-scrim { display: none; }

@media (max-width: 1080px) {
  .page { padding: 20px 22px 44px; }
  /* any fixed multi-column dashboard grid → stack */
  .page > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* wide tables stay usable via horizontal scroll */
  .tbl-wrap { overflow-x: auto; }
  .tbl-wrap > table.tbl { min-width: 640px; }
}

@media (max-width: 1280px) {
  .topbar { gap: 14px; padding: 16px 28px; }
  .topbar > .topbar-inner { gap: 14px; }
  .topbar-title { font-size: 21px; }
  .topbar .search { flex: 0 1 240px; width: 240px; max-width: 240px !important; min-width: 190px; margin-left: auto; }
  .profile { max-width: 214px; padding-right: 6px; overflow: hidden; flex: 0 1 214px; }
  .profile .pname { max-width: 126px; }
  .page { padding-left: 34px; padding-right: 34px; }
}

/* ---------- Mobile / tablet: sidebar becomes a slide-out drawer ---------- */
@media (max-width: 900px) {
  /* single column — content takes full width, no sidebar gutter */
  .app { grid-template-columns: 1fr; }
  /* sidebar slides in from the left as an overlay drawer */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 264px; z-index: 120;
    transform: translateX(-100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 18px 50px rgba(8,18,40,.45);
  }
  .app.drawer-open .sidebar { transform: translateX(0); }
  .sidebar .brand-name, .sidebar .nav-item span, .sidebar .nav-item { display: flex; }   /* restore full labels in drawer */
  .sidebar-foot { display: block; }
  .drawer-close { display: grid; place-items: center; margin-left: auto; width: 34px; height: 34px; border-radius: 9px; color: var(--muted); }
  .drawer-close:hover { background: rgba(255,255,255,.58); color: var(--ink); }
  /* dark overlay behind the drawer */
  .drawer-scrim { display: block; position: fixed; inset: 0; z-index: 110; border: none;
    background: rgba(8,16,34,.5); opacity: 0; pointer-events: none; transition: opacity .26s; }
  .app.drawer-open .drawer-scrim { opacity: 1; pointer-events: auto; }
  /* hamburger appears in the top bar */
  .hamburger { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; flex: none; }
  .hamburger:hover { background: var(--bg-2); }
  .topbar { padding: 14px 18px; }
  .topbar-divider { display: none; }
}

/* bottom mobile nav — desktop-hidden by default */
.mobilenav { display: none; }

@media (max-width: 767px) {
  .topbar-title { font-size: 17px; }
  .back-btn { min-width: 40px; width: 40px; padding: 0; }
  .back-btn span { display: none; }
  .page { padding: 16px 14px 40px; }
  .page-head { flex-wrap: wrap; }
  .page-head .ph-meta { display: none; }
  /* search collapses so it never overflows the mobile header */
  .topbar .search { display: none; }
  .profile .pname { display: none; }
  .synced { display: none; }
  /* dense card grids → one column; toolbars stack */
  .page div[style*="repeat(2"], .page div[style*="repeat(3"], .page div[style*="repeat(4"], .page div[style*="repeat(5"] { grid-template-columns: 1fr !important; }
  .seg { overflow-x: auto; max-width: 100%; }

  /* fixed bottom navigation (Instagram-style app shell) */
  .mobilenav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 20px rgba(8,18,40,.07);
  }
  .mobilenav-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; cursor: pointer; padding: 6px 2px;
    color: var(--faint); font-size: 10.5px; font-weight: 700; min-height: 52px;
    transition: color .15s;
  }
  .mobilenav-item.active { color: var(--blue); }
  .mobilenav-item:active { transform: scale(.94); }
  /* keep last content clear of the bar */
  .app-main { padding-bottom: 64px; }
  .page { padding-bottom: 24px; }
}

/* weekly attendance tiles */
.wk-tile { border: 1px solid var(--line); border-left-width: 3px; border-radius: 11px; padding: 12px 6px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: transform .15s; }
.wk-tile:hover { transform: translateY(-2px); }
.wk-dot { width: 8px; height: 8px; border-radius: 50%; margin: 2px 0; }

/* full calendar grid */
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cgrid-dow { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--faint); padding: 10px 0; background: #fafbfd; border-bottom: 1px solid var(--line); }
.cgrid-cell { min-height: 92px; padding: 6px 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.cgrid-cell:nth-child(7n) { border-right: none; }
.cgrid-cell:hover { background: #f7f9fc; }
.cgrid-cell.muted { background: #fbfcfe; }
.cgrid-cell.muted .cgrid-num { color: #c4ccd9; }
.cgrid-cell.sel { background: var(--blue-soft-2); box-shadow: inset 0 0 0 2px var(--blue); }
.cgrid-num { font-size: 13px; font-weight: 700; color: var(--ink-2); display: inline-grid; place-items: center; min-width: 24px; height: 24px; }
.cgrid-num.today { background: var(--blue); color: #fff; border-radius: 50%; }
.cgrid-events { margin-top: 4px; display: flex; flex-direction: column; gap: 3px; }
.cev { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; line-height: 1.25; padding: 3px 7px; border-radius: 6px; overflow: hidden; white-space: nowrap; }
.cev-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.cev-t { overflow: hidden; text-overflow: ellipsis; }
.cev-more { font-size: 10px; font-weight: 700; color: var(--blue); padding-left: 4px; }
.wcol { border: 1px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; transition: background .12s; }
.wcol:hover { background: #f7f9fc; }
.wcol.sel { background: var(--blue-soft-2); box-shadow: inset 0 0 0 2px var(--blue); }

/* pagination buttons */
.pg { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 700; display: inline-grid; place-items: center; transition: all .15s; }
.pg:hover { border-color: var(--blue); color: var(--blue); }
.pg.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* inline action links (tables) */
.lnk { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; color: var(--blue); white-space: nowrap; }
.lnk:hover { color: var(--blue-700); text-decoration: underline; }
.lnk.muted { color: var(--muted); }

/* dropdown menu items (kebab / profile) */
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); transition: background .12s; }
.menu-item:hover { background: #f5f7fc; }
.menu-item svg { color: var(--faint); }
.notif-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px; border-bottom: 1px solid var(--line); transition: background .12s; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: #f7f9fc; }

/* ============================================================ Modals */
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8, 18, 34, .58);
  backdrop-filter: blur(6px);
  padding: 24px;
  animation: overlayIn .18s ease both;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(var(--modal-width, 560px), calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: min(88vh, calc(100vh - 48px));
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 90px rgba(8, 18, 34, .38);
  animation: modalIn .26s cubic-bezier(.2,.8,.2,1) both;
  overflow: hidden;
}
.modal-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 22px; overflow-y: auto; min-height: 0; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fafbfd; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; }
.form-section-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.ext-chip { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--purple); background: var(--purple-bg); padding: 3px 10px; border-radius: 7px; letter-spacing: .02em; }

/* ============================================================ Command palette */
.cmdk { position: fixed; inset: 0; z-index: 320; background: rgba(10, 20, 44, .42); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: overlayIn .15s ease both; }
.cmdk-box { width: min(620px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(10, 20, 44, .4); overflow: hidden; animation: modalIn .22s cubic-bezier(.2,.8,.2,1) both; }
.cmdk-search { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cmdk-search input { flex: 1; border: none; outline: none; font-size: 16px; color: var(--ink); font-weight: 600; }
.cmdk-search input::placeholder { color: var(--faint); font-weight: 500; }
.cmdk-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.cmdk-group { font-size: 11px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 12px 12px 6px; }
.cmdk-item { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; transition: background .1s; }
.cmdk-item .ck-ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.cmdk-item.sel { background: var(--blue-soft-2); }
.cmdk-item .ck-arrow { margin-left: auto; opacity: 0; }
.cmdk-item.sel .ck-arrow { opacity: 1; }
.cmdk-foot { display: flex; gap: 16px; padding: 11px 18px; border-top: 1px solid var(--line); background: #fafbfd; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cmdk-foot kbd, .kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 5px; background: #eef2f8; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; color: var(--muted); font-family: inherit; }
.search .kbd { margin-left: auto; }

/* ============================================================ Chart tooltip */
.chart-wrap { position: relative; }
.chart-tip { position: absolute; z-index: 10; pointer-events: none; background: var(--navy-deep); color: #fff; padding: 9px 12px; border-radius: 9px; font-size: 11.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(10,20,44,.3); transform: translate(-50%, -100%); white-space: nowrap; transition: opacity .12s; }
.chart-tip b { color: #fff; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.chart-tip .tip-row i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.chart-hover-col { cursor: pointer; }

/* micro-interactions: dashboard card hover lift */
.lift { transition: transform .18s ease, box-shadow .18s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(16, 33, 70, .12); }

.docname { display: flex; align-items: center; gap: 12px; text-align: left; transition: color .12s; }
.docname:hover span { color: var(--blue) !important; text-decoration: underline; }

/* document preview (paper) */
.docp-paper { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 30px 34px; box-shadow: inset 0 0 0 1px rgba(16,33,70,.02); }
[data-theme="dark"] .docp-paper { background: #10192c; border-color: var(--line); }
.docp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 2px solid var(--navy-deep); margin-bottom: 20px; }
.docp-stamp { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 6px; padding: 3px 9px; transform: rotate(-3deg); opacity: .85; }
.docp-kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; background: var(--bg-2); border-radius: 10px; padding: 14px 16px; }
.docp-subhead { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.docp-netpay { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 14px 18px; background: linear-gradient(135deg, var(--blue-soft-2), var(--blue-soft)); border: 1px solid #dbe7fb; border-radius: 12px; }
.docp-netpay span { font-size: 14px; font-weight: 700; color: var(--navy-deep); }
.docp-netpay b { font-size: 22px; font-weight: 800; color: var(--blue); letter-spacing: -.5px; }
.docp-idcard { background: linear-gradient(135deg, #1f53c9, #0a1c44); border-radius: 14px; padding: 18px 20px; box-shadow: 0 10px 24px rgba(10,28,68,.3); max-width: 380px; margin: 0 auto; }
.docp-idphoto { width: 74px; height: 90px; border-radius: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }

/* medical receipt paper */
.receipt-paper { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
[data-theme="dark"] .receipt-paper { background: #10192c; }
.receipt-perf { height: 10px; background: radial-gradient(circle at 6px -3px, transparent 6px, var(--card) 6px) repeat-x; background-size: 14px 10px; border-bottom: 1px dashed var(--line-strong); }
[data-theme="dark"] .receipt-perf { background: radial-gradient(circle at 6px -3px, transparent 6px, #10192c 6px) repeat-x; background-size: 14px 10px; }
.receipt-stamp { display: inline-grid; place-items: center; font-size: 14px; font-weight: 800; letter-spacing: .14em; color: var(--green); border: 2.5px solid var(--green); border-radius: 8px; padding: 5px 14px; transform: rotate(-9deg); opacity: .82; }

/* attendance mini summary (dashboard card) */
.att-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.att-summary-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; background: #ffffff; border: 1px solid var(--line); border-radius: 11px; }
.att-summary-tile b { font-size: 18px; font-weight: 800; color: var(--navy-deep); letter-spacing: -.3px; }
.att-summary-tile .att-lbl { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.att-dot { width: 8px; height: 8px; border-radius: 50%; }

/* coaching interpretation note */
.coach-note { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--green); background: var(--green-bg); border-radius: 10px; padding: 9px 12px; margin: 14px 0 16px; text-align: center; }

/* pill-style table action button */
.pill-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--blue); background: var(--blue-soft-2); border: 1px solid transparent; padding: 5px 13px; border-radius: 99px; transition: all .15s; cursor: pointer; }
.pill-btn:hover { background: var(--blue); color: #fff; }
table.tbl.hover tbody tr:hover .pill-btn { border-color: rgba(37,99,235,.25); }

/* sidebar logged-in user block */
.sidebar-user { display: flex; align-items: center; gap: 11px; margin: 14px 6px 4px; padding: 11px 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.10); border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.sidebar-user .su-name { font-size: 12.5px; font-weight: 800; color: #f8fbff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .su-role { font-size: 11px; font-weight: 700; color: rgba(255,255,255,.72); }

/* approval rows (manager/hr dashboards) */
.approval-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.approval-row:hover { border-color: var(--line-strong); box-shadow: 0 4px 12px rgba(16,33,70,.05); }

/* ============================================================
   MODERN BUSINESS UI REFRESH
   Cohesive HR SaaS styling: refined canvas, premium shell, polished controls.
   ============================================================ */
body {
  background:
    radial-gradient(circle at 85% -10%, rgba(47,111,237,.10), transparent 34%),
    radial-gradient(circle at -10% 20%, rgba(6,182,212,.08), transparent 30%),
    var(--bg);
}

.app { background: #eef3f8; }

.sidebar {
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,0) 22%),
    radial-gradient(circle at 18% 0%, rgba(47,111,237,.34), transparent 34%),
    radial-gradient(circle at 100% 34%, rgba(6,182,212,.22), transparent 34%),
    linear-gradient(180deg, #101827 0%, #111f35 48%, #0b2533 100%);
  border-right: 1px solid rgba(255,255,255,.10);
}
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 48%, rgba(255,255,255,.045) 48% 49%, transparent 49% 100%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.08), transparent 34%);
  opacity: .9;
}
.brand, .nav, .sidebar-user, .sidebar-foot { position: relative; z-index: 1; }
.brand { padding-bottom: 26px; }
.brand-mark {
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}
.brand-word { color: #ffffff; letter-spacing: -.45px; }
.brand-word-2 { color: #8ee7f4; }
.nav { gap: 6px; }
.nav-item {
  border: 1px solid transparent;
  color: rgba(241,245,249,.78);
  border-radius: 14px;
}
.nav-item:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.10);
  color: #fff;
}
.nav-item.active {
  background: #ffffff;
  color: #10213b;
  border-color: rgba(255,255,255,.40);
  box-shadow: 0 18px 34px rgba(0,0,0,.22);
}
.nav-item.active svg { color: var(--blue); }
.nav-sep { background: rgba(255,255,255,.12); }
.sidebar-user {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.14);
  backdrop-filter: blur(14px);
}

.app-main {
  background:
    radial-gradient(circle at 88% 0%, rgba(47,111,237,.10), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #f6f8fb 46%, #eef3f8 100%);
}
.topbar {
  padding: 17px 40px;
  background: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(215,224,235,.86);
  box-shadow: 0 10px 34px rgba(15,23,42,.045);
}
.topbar-title {
  font-size: 23px;
  letter-spacing: -.55px;
}
.page { padding: 34px 48px 58px; }
.page-head {
  align-items: center;
  margin-bottom: 24px;
}
.page-head .ph-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(47,111,237,.12), rgba(6,182,212,.12));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(47,111,237,.08);
}
.page-head h1 {
  font-size: 31px;
  letter-spacing: -.75px;
}
.page-head p {
  font-size: 14.5px;
  color: #718096;
}
.page-head .ph-meta,
.search,
.synced,
.bell,
.back-btn,
.profile:hover {
  background: rgba(255,255,255,.92);
  border-color: rgba(215,224,235,.95);
  box-shadow: 0 8px 24px rgba(15,23,42,.045);
}
.search {
  border-radius: 15px;
  padding: 11px 15px;
}
.search:focus-within {
  border-color: rgba(47,111,237,.55);
  box-shadow: 0 0 0 4px rgba(47,111,237,.12), 0 10px 28px rgba(15,23,42,.06);
}
.bell, .back-btn { border-radius: 14px; }

.card {
  border-color: rgba(215,224,235,.86) !important;
  border-radius: 20px !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 18px 42px rgba(15,23,42,.07) !important;
}
.card-pad { padding: 24px 26px; }
.card-head h3 {
  font-size: 19.5px;
  letter-spacing: -.45px;
}
.card-head .ch-icon,
.qa-ic,
.info-tile .it-ic,
.pf-ic,
.login-demo-ic {
  border-radius: 13px;
}
.lift:hover,
.best-card:hover,
.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15,23,42,.11);
}

.btn {
  border-radius: 13px;
  font-weight: 800;
}
.btn-primary {
  background: linear-gradient(135deg, #2f6fed 0%, #1f58d6 100%);
  box-shadow: 0 14px 28px rgba(47,111,237,.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #397af4 0%, #1d4ed8 100%);
  transform: translateY(-1px);
}
.btn-outline,
.btn-ghost,
.chip,
.pg {
  border-color: rgba(215,224,235,.98);
}
.btn-ghost:hover,
.btn-outline:hover,
.chip:hover,
.pg:hover {
  background: #f5f8ff;
  box-shadow: 0 8px 20px rgba(15,23,42,.055);
}
.btn-green,
.qa-btn.primary,
.clockbtn.in {
  background: linear-gradient(135deg, #18b981, #0f9f6e);
}

.seg {
  background: #edf3f9;
  border: 1px solid rgba(215,224,235,.72);
}
.seg button { border-radius: 10px; }
.seg button.active {
  background: linear-gradient(135deg, #2f6fed, #1d4ed8);
  box-shadow: 0 10px 24px rgba(47,111,237,.24);
}
.seg.light button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}

table.tbl {
  font-size: 13.7px;
}
table.tbl th {
  background: #f8fafc;
  color: #69778c;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .035em;
}
table.tbl td {
  color: #405168;
}
table.tbl.hover tbody tr:hover {
  box-shadow: inset 0 0 0 9999px rgba(47,111,237,.035);
}
.tbl-wrap {
  border-color: rgba(215,224,235,.92);
  border-radius: 16px;
}

.field input,
.field select,
.field textarea,
.login-card .field input {
  border-radius: 14px;
  border-color: rgba(215,224,235,.98);
  background: #fff;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.login-card .field input:focus {
  border-color: rgba(47,111,237,.62);
  box-shadow: 0 0 0 4px rgba(47,111,237,.12);
}
.dropzone {
  background: #fbfdff;
  border-radius: 16px;
}

.badge {
  padding: 5px 12px;
  font-weight: 800;
}
.badge.blue { background: #eaf2ff; color: #255ed8; }
.badge.green { background: #e9f9f2; color: #0f9f5e; }
.badge.amber { background: #fff4df; color: #b66b00; }
.badge.red { background: #fff0f0; color: #d92525; }
.badge.purple { background: #f0ebff; color: #7045d9; }
.badge.slate { background: #eef3f8; color: #65758b; }

.qa-btn,
.event-row,
.task-row,
.upcoming-row,
.insight-tile,
.approval-row,
.att-summary-tile,
.best-card,
.bt-stat,
.portfolio-card {
  border-color: rgba(215,224,235,.92);
  border-radius: 16px;
}
.qa-btn:hover,
.event-row:hover,
.task-row:hover,
.upcoming-row:hover,
.insight-tile:hover,
.approval-row:hover {
  border-color: rgba(47,111,237,.35);
  background: #f8fbff;
  box-shadow: 0 12px 28px rgba(15,23,42,.065);
}
.card-link {
  border-radius: 13px;
  font-weight: 800;
}
.card-link:hover {
  background: linear-gradient(135deg, #2f6fed, #1d4ed8);
  border-color: transparent;
}

.progress { background: #e9eef5; }
.progress > span {
  background: linear-gradient(90deg, #2f6fed, #06b6d4);
}
.progress.green > span {
  background: linear-gradient(90deg, #16a34a, #06b6d4);
}
.progress.grad > span {
  background: linear-gradient(90deg, #2f6fed, #06b6d4, #16a34a);
}

.modal {
  border-radius: 22px;
  border-color: rgba(226,232,240,.95);
  box-shadow: 0 36px 100px rgba(8,18,34,.34);
}
.modal-head,
.modal-foot {
  background: #fbfdff;
}
.modal-foot {
  border-top-color: rgba(215,224,235,.86);
}

/* ============================================================ LOGIN */
.login-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(390px, .82fr) minmax(560px, 1.18fr);
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(90deg, #0d2038 0%, #102843 32%, #eef4f8 32%, #f8fbfd 100%);
}
.login-wrap::before,
.login-wrap::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.10);
}
.login-wrap::before {
  width: 520px;
  height: 520px;
  left: -190px;
  top: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.055), transparent 66%);
  box-shadow: 0 0 0 34px rgba(255,255,255,.022);
}
.login-wrap::after {
  width: 460px;
  height: 460px;
  right: -120px;
  bottom: -160px;
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(47,111,237,.06), rgba(6,182,212,.045));
  transform: rotate(-14deg);
}
.login-brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 52px 56px;
  color: #fff;
}
.login-brand::before {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.18), transparent);
}
.login-brand::after {
  content: '';
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 108px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.24), transparent);
}
.login-brand-top { display: flex; align-items: center; gap: 14px; }
.login-brand .brand-mark {
  background: rgba(255,255,255,.96);
  box-shadow: 0 20px 44px rgba(0,0,0,.24);
}
.login-brand-mid {
  margin-top: auto;
  margin-bottom: auto;
  max-width: 500px;
  position: relative;
  z-index: 2;
}
.login-brand-mid h1 {
  font-family: var(--display-font);
  font-size: clamp(40px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.03;
  margin: 0 0 18px;
  text-shadow: 0 16px 38px rgba(0,0,0,.22);
}
.login-brand-mid p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(232,243,255,.78);
  margin: 0 0 28px;
}
.login-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.login-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  font-size: 14.5px;
  font-weight: 800;
  color: rgba(248,251,255,.88);
  background: rgba(255,255,255,.085);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  padding: 8px 14px 8px 8px;
  backdrop-filter: blur(12px);
}
.login-points li svg { color: #0f766e; background: #dbfffb; border-radius: 50%; padding: 4px; width: 25px; height: 25px; }
.login-brand-foot { font-size: 12px; color: rgba(226,239,255,.62); position: relative; z-index: 2; }
.login-orb { position: absolute; border-radius: 50%; filter: blur(8px); opacity: .5; z-index: 1; }
.login-orb-1 { width: 360px; height: 360px; background: radial-gradient(circle, rgba(47,111,237,.36), transparent 70%); top: 18%; right: -130px; }
.login-orb-2 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(6,182,212,.30), transparent 70%); bottom: 10%; left: -90px; }

.login-form-side {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 52px 42px;
  background:
    radial-gradient(circle at 72% 18%, rgba(47,111,237,.075), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.42));
}
.login-card {
  width: min(540px, calc(100vw - 48px));
  max-width: 540px;
  padding: 36px 40px 28px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 26px 70px rgba(15,23,42,.16);
  border: 1px solid #e5ecf4;
  backdrop-filter: none;
}
.login-card::after {
  content: 'Secure access for authorized personnel';
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .04em;
  color: #8ba0bc;
}
.login-card-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #edf2f8;
}
.login-card-brand .brand-mark {
  border-radius: 15px;
  box-shadow: 0 14px 28px rgba(15,23,42,.12);
}
.login-card-brand b {
  display: block;
  font-size: 15px;
  color: var(--navy-deep);
  letter-spacing: -.2px;
}
.login-card-brand span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: #8ba0bc;
  text-transform: uppercase;
  letter-spacing: .055em;
}
.login-card .field label {
  color: #25344a;
  font-weight: 800;
}
.login-card .kebab {
  color: #8ea1b8;
}
.login-card .kebab:hover {
  background: #f2f6fb;
  color: #246bfe;
}
.login-card h2 { font-family: var(--display-font); font-size: 35px; font-weight: 800; color: #081a35; margin: 0 0 6px; letter-spacing: -1px; }
.login-sub { font-size: 15.5px; color: #71839c; margin: 0 0 30px; }
.login-error { display: flex; align-items: center; gap: 10px; background: #fff1f2; color: #dc2626; border: 1px solid #fecdd3; border-radius: 14px; padding: 12px 14px; font-size: 13px; font-weight: 800; margin-bottom: 18px; }
.login-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9bacbf; display: grid; place-items: center; }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 26px 0 14px; color: #9badc4; font-size: 12px; font-weight: 800; }
.login-divider::before, .login-divider::after { content: ''; height: 1px; background: var(--line-strong); flex: 1; }
.login-demos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.login-demo { display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #e3ebf5; border-radius: 16px; background: #fff; transition: all .16s; box-shadow: 0 8px 20px rgba(15,23,42,.035); }
.login-demo:hover { border-color: rgba(47,111,237,.45); background: #f8fbff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,23,42,.08); }
.login-demo-ic { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.login-card .field input {
  height: 56px;
  border-color: #e3ebf5;
  border-radius: 14px;
  background: #fff;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 8px 18px rgba(31,55,100,.035);
}
.login-card .field input:focus {
  border-color: rgba(47,111,237,.62);
  box-shadow: 0 0 0 4px rgba(47,111,237,.12), 0 12px 28px rgba(31,55,100,.07);
}
.login-card .btn-primary {
  height: 58px;
  border-radius: 14px;
  font-size: 16px;
  background: #246bfe;
  box-shadow: 0 16px 30px rgba(36,107,254,.24);
}
.login-card .btn-primary:hover {
  background: #1d58dc;
}
[data-theme="dark"] .login-demo { background: var(--card); }
[data-theme="dark"] .login-form-side { background: var(--bg); }

/* Login refinement: executive two-tone portal without brand watermark */
.login-wrap {
  min-height: 100dvh;
  height: 100dvh;
  grid-template-columns: clamp(460px, 31.5vw, 620px) minmax(0, 1fr);
  background:
    linear-gradient(90deg, #10213a 0%, #10213a 31.5%, #f3f7fb 31.5%, #f8fbfd 100%);
}
.login-wrap::before {
  width: 620px;
  height: 620px;
  left: -280px;
  top: 8%;
  border-color: rgba(255,255,255,.08);
  background:
    radial-gradient(circle, rgba(255,255,255,.055), transparent 63%),
    linear-gradient(135deg, rgba(255,255,255,.05), transparent);
  box-shadow: 0 0 0 44px rgba(255,255,255,.018);
}
.login-wrap::after {
  right: -180px;
  bottom: -180px;
  width: 560px;
  height: 560px;
  border-radius: 40px;
  background:
    linear-gradient(145deg, rgba(15,33,58,.06), rgba(14,116,144,.045));
  transform: rotate(-12deg);
}
.login-brand {
  min-height: 100dvh;
  padding: clamp(38px, 4.1vh, 58px) clamp(46px, 3vw, 64px);
  background:
    radial-gradient(circle at 16% 18%, rgba(255,255,255,.09), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 34%);
}
.login-brand::after {
  left: 58px;
  right: 58px;
  bottom: 118px;
  opacity: .42;
}
.login-symbol {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(47,111,237,.92), rgba(14,116,144,.92));
  box-shadow: 0 18px 40px rgba(2,10,25,.28), inset 0 0 0 1px rgba(255,255,255,.22);
  flex: none;
}
.login-symbol.compact {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #1f6feb;
  background: linear-gradient(135deg, #eef5ff, #e9fbff);
  box-shadow: inset 0 0 0 1px rgba(47,111,237,.12);
}
.login-brand-mid {
  max-width: 470px;
}
.login-brand-mid h1 {
  font-size: clamp(42px, 3.45vw, 64px);
  line-height: 1.02;
  letter-spacing: -1.35px;
}
.login-brand-mid p {
  max-width: 430px;
  color: rgba(230,241,255,.76);
}
.login-points li {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.11);
  box-shadow: 0 12px 28px rgba(0,0,0,.10);
}
.login-orb {
  display: none;
}
.login-form-side {
  min-width: 0;
  min-height: 100dvh;
  padding: clamp(34px, 5.8vh, 72px) clamp(54px, 7vw, 132px);
  justify-items: center;
  align-items: center;
  background:
    radial-gradient(circle at 72% 12%, rgba(47,111,237,.06), transparent 28%),
    radial-gradient(circle at 100% 92%, rgba(14,116,144,.065), transparent 26%),
    linear-gradient(180deg, #f8fbfd, #eef5f8);
}
.login-card {
  width: clamp(520px, 30vw, 580px);
  max-width: 100%;
  max-height: calc(100dvh - 92px);
  overflow-y: auto;
  padding: clamp(34px, 4.1vh, 44px) clamp(38px, 2.8vw, 48px) clamp(26px, 3vh, 34px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
  border: 1px solid rgba(226,232,240,.96);
  box-shadow: 0 34px 86px rgba(15,23,42,.15);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.login-card::after {
  content: 'Protected employee access';
  color: #94a3b8;
}
.login-card-brand {
  margin-bottom: 28px;
  padding-bottom: 20px;
}
.login-card-brand b {
  font-size: 15.5px;
}
.login-card h2 {
  color: #0b1b33;
  font-size: 36px;
  letter-spacing: -1.15px;
}
.login-sub {
  color: #667892;
}
.login-card .field input {
  height: 58px;
  border-color: #dfe8f3;
  box-shadow: 0 10px 22px rgba(15,23,42,.035);
}
.login-card .btn-primary {
  background: linear-gradient(135deg, #2563eb, #0e7490);
  box-shadow: 0 18px 34px rgba(37,99,235,.23);
}
.login-card .btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #0f6f8e);
  transform: translateY(-1px);
}
.login-demo {
  border-color: #dfe8f3;
  border-radius: 15px;
}
.login-demo:hover {
  border-color: rgba(14,116,144,.40);
}

@media (max-width: 1040px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form-side {
    padding: 34px 18px;
    background: transparent;
  }
}

@media (max-width: 680px) {
  .login-form-side { padding: 24px 16px; }
  .login-card { width: 100%; padding: 28px 22px 22px; border-radius: 24px; }
  .login-card-brand { margin-bottom: 22px; }
  .login-card-brand .brand-mark { width: 42px !important; height: 42px !important; }
  .login-card h2 { font-size: 29px; }
  .login-demos { grid-template-columns: 1fr; }
}

/* toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 200; background: #0f172a; color: #fff; padding: 14px 22px; border-radius: 14px; font-size: 14px; font-weight: 700; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 11px; animation: fadeUp .3s ease both; border: 1px solid rgba(255,255,255,.08); }
.toast svg { width: 18px; height: 18px; }

/* ============================================================ DARK THEME */
[data-theme="dark"] {
  --bg: #0b1322; --bg-2: #131d31; --card: #16213c; --line: #243149; --line-strong: #30405d;
  --ink: #eaf0fb; --ink-2: #c3cfe3; --muted: #93a1bd; --faint: #6f7e9b; --navy-deep: #f1f5ff;
  --blue-soft: rgba(37,99,235,.20); --blue-soft-2: rgba(37,99,235,.13);
  --green-bg: rgba(21,160,90,.18); --red-bg: rgba(220,38,38,.18); --amber-bg: rgba(217,119,6,.18);
  --purple-bg: rgba(124,58,237,.20); --info-bg: rgba(37,99,235,.18);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.32);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.55);
}
[data-theme="dark"] .topbar { background: rgba(11,19,34,.82); }
[data-theme="dark"] .search, [data-theme="dark"] .bell, [data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-ghost, [data-theme="dark"] .card-link, [data-theme="dark"] .chip,
[data-theme="dark"] .qa-btn, [data-theme="dark"] .pg, [data-theme="dark"] .synced { background: var(--card); }
[data-theme="dark"] table.tbl th { background: #111c33; }
[data-theme="dark"] table.tbl.hover tbody tr:hover { background: rgba(255,255,255,.035); }
[data-theme="dark"] .seg { background: #0f1828; }
[data-theme="dark"] .seg.light button.active { background: var(--card); }
[data-theme="dark"] .modal { background: var(--card); }
[data-theme="dark"] .modal-foot { background: #111c33; }
[data-theme="dark"] .cmdk-box { background: var(--card); }
[data-theme="dark"] .cmdk-foot { background: #111c33; }
[data-theme="dark"] .kbd, [data-theme="dark"] .cmdk-foot kbd { background: #1c2840; border-color: #30405d; }
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea { background: #0f1828; color: var(--ink); }
[data-theme="dark"] .menu-item:hover { background: rgba(255,255,255,.06); }
[data-theme="dark"] .notif-row:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .cgrid-dow { background: #111c33; }
[data-theme="dark"] .cgrid-cell.muted { background: rgba(255,255,255,.02); }
[data-theme="dark"] .cgrid-cell:hover, [data-theme="dark"] table.tbl.hover tbody tr { }
[data-theme="dark"] .progress { background: #1c2840; }
[data-theme="dark"] .ph-img { background: repeating-linear-gradient(45deg, #16213c 0 12px, #1b2742 12px 24px); border-color: var(--line); }
[data-theme="dark"] .scroll::-webkit-scrollbar-thumb, [data-theme="dark"] .app-main::-webkit-scrollbar-thumb { background: #2c3a55; }
[data-theme="dark"] .card-link:hover { background: var(--blue); }
[data-theme="dark"] .toast { background: #1c2840; }
[data-theme="dark"] .page-head .ph-meta { background: var(--card); }
[data-theme="dark"] .tbl-wrap { background: var(--card); }
[data-theme="dark"] .event-row:hover { box-shadow: 0 6px 16px rgba(0,0,0,.35); }

/* ============================================================
   Trainer Assign Training — desktop-only structured workflow
   ============================================================ */
.trainer-assign-page { max-width: none; overflow-x: auto; }
.ta-desktop-shell { width: min(1280px, 100%); min-width: 1180px; margin: 0 auto; }
.ta-skeleton-card { display: grid; grid-template-columns: 1.2fr .7fr .45fr; gap: 16px; margin-bottom: 20px; }
.ta-skeleton-card .skel { height: 42px; border-radius: 12px; }
.ta-main-grid { display: grid; grid-template-columns: minmax(0, 65fr) minmax(340px, 35fr); gap: 22px; align-items: start; }
.ta-form-card { padding: 0; overflow: hidden; }
.ta-section { padding: 24px 26px; border-bottom: 1px solid var(--line); }
.ta-section:last-of-type { border-bottom: none; }
.ta-section-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 18px; }
.ta-section-head > span { width: 30px; height: 30px; border-radius: 10px; background: var(--purple-bg); color: var(--purple); display: grid; place-items: center; font-size: 13px; font-weight: 900; flex: none; }
.ta-section-head h3 { margin: 0; color: var(--navy-deep); font-size: 18px; font-weight: 850; letter-spacing: -.2px; }
.ta-section-head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ta-stack { display: flex; flex-direction: column; gap: 16px; }
.ta-field-row { display: grid; gap: 14px; }
.ta-field-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ta-field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ta-field-row.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ta-field-row.compact { gap: 12px; }
.ta-toggle-field { display: flex; align-items: flex-end; }
.ta-toggle-row { width: 100%; min-height: 46px; display: flex; align-items: center; gap: 11px; text-align: left; border: 1px solid var(--line-strong); background: #fff; border-radius: 12px; padding: 11px 13px; color: var(--ink-2); }
.ta-toggle-row b { display: block; font-size: 13px; color: var(--ink); }
.ta-toggle-row small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.ta-method-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ta-method-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 11px; text-align: left; border: 1px solid var(--line-strong); border-radius: 14px; background: #fff; padding: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.ta-method-card > span { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.ta-method-card b { font-size: 13.5px; color: var(--ink); }
.ta-method-card small { font-size: 12px; color: var(--muted); line-height: 1.45; }
.ta-method-card.active { border-color: rgba(47, 111, 237, .45); background: var(--blue-soft-2); box-shadow: 0 0 0 3px rgba(47, 111, 237, .10); }
.ta-audience-note { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 12px; background: #f8fbff; border: 1px solid #dce8fb; color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.ta-employee-box { border: 1px solid var(--line); border-radius: 14px; background: #fbfdff; overflow: hidden; }
.ta-box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff; }
.ta-box-head b { font-size: 13.5px; color: var(--ink); }
.ta-box-head span { font-size: 12px; color: var(--muted); font-weight: 700; }
.ta-employee-toolbar { display: grid; grid-template-columns: 1.4fr .8fr .9fr .9fr; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); background: #fff; }
.ta-employee-list { max-height: 430px; overflow-y: auto; padding: 8px; }
.ta-employee-list.compact { max-height: 360px; }
.ta-employee-row { display: grid; grid-template-columns: auto auto minmax(180px, 1fr) minmax(300px, 1.1fr); align-items: center; gap: 11px; padding: 10px 11px; border-radius: 12px; border: 1px solid transparent; }
.ta-employee-row + .ta-employee-row { margin-top: 5px; }
.ta-employee-row.pickable { cursor: pointer; }
.ta-employee-row:hover { border-color: var(--line-strong); background: #fff; }
.ta-employee-row.excluded { grid-template-columns: auto auto minmax(170px, 1fr) minmax(250px, .9fr) minmax(220px, .8fr); background: var(--red-bg); border-color: rgba(220, 38, 38, .16); }
.ta-employee-row input[type="checkbox"], .ta-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--blue); }
.ta-emp-main { min-width: 0; }
.ta-emp-main b { display: block; font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-emp-main span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ta-emp-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.ta-emp-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-exclude-input { width: 100%; padding: 9px 11px; border: 1px solid rgba(220, 38, 38, .25); border-radius: 9px; font-size: 12px; background: #fff; }
.ta-empty-inline, .ta-empty-table, .ta-empty-material { display: grid; place-items: center; gap: 9px; text-align: center; color: var(--muted); padding: 28px 16px; font-size: 13px; }
.ta-display-title { border: 1px solid #dce8fb; background: linear-gradient(180deg, #fbfdff, #f6f9ff); border-radius: 14px; padding: 14px 16px; }
.ta-display-title span, .ta-summary-list span, .ta-schedule-preview span, .ta-recent-stats span { display: block; font-size: 11.5px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.ta-display-title b { display: block; margin-top: 4px; color: var(--navy-deep); font-size: 16px; }
.ta-display-title small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.ta-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ta-mini-head b { color: var(--ink); font-size: 13.5px; }
.ta-mini-head span { color: var(--muted); font-size: 12px; font-weight: 700; }
.ta-objective-list { display: grid; gap: 8px; margin-top: 10px; }
.ta-objective-list input, .ta-filter-row input, .ta-filter-row select { width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; color: var(--ink); font-size: 13px; outline: none; }
.ta-schedule-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ta-schedule-preview > div { border: 1px solid var(--line); border-radius: 13px; background: #fff; padding: 13px 14px; }
.ta-schedule-preview b { display: block; margin-top: 5px; color: var(--navy-deep); font-size: 13px; line-height: 1.35; }
.ta-reminders { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.ta-reminders .ta-mini-head { grid-column: 1 / -1; }
.ta-check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.ta-check.cardish { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px 13px; }
.ta-material-list { display: grid; gap: 12px; }
.ta-material-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px; }
.ta-material-card[draggable="true"] { cursor: grab; }
.ta-material-top { display: grid; grid-template-columns: auto minmax(240px, 1fr) minmax(180px, .6fr) auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.ta-seq { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--purple-bg); color: var(--purple); font-weight: 900; align-self: center; }
.ta-upload-row { display: flex; align-items: center; gap: 9px; margin-top: 8px; min-height: 30px; }
.ta-upload-row span { min-width: 0; color: var(--green); font-size: 11.5px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-video-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; background: #0f172a; aspect-ratio: 16 / 9; }
.ta-video-preview iframe { width: 100%; height: 100%; border: 0; }
.ta-error-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 11px; background: var(--red-bg); color: var(--red); font-size: 12.5px; font-weight: 700; }
.ta-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ta-actions { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; border-top: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(10px); }
.ta-summary-card { position: sticky; top: 94px; }
.ta-summary-ref { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 12px 14px; border-radius: 13px; background: var(--blue-soft-2); border: 1px solid #dce8fb; }
.ta-summary-ref span { grid-column: 1 / -1; font-size: 11px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ta-summary-ref b { color: var(--navy-deep); font-size: 18px; }
.ta-avatar-stack { display: flex; align-items: center; gap: 0; min-height: 42px; margin: 16px 0; }
.ta-avatar-stack > div { margin-right: -8px; border: 2px solid #fff; }
.ta-more { margin-left: 12px; font-size: 12px; color: var(--muted); font-weight: 800; }
.ta-summary-list { display: grid; gap: 9px; }
.ta-summary-list > div { display: grid; grid-template-columns: minmax(110px, .75fr) minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ta-summary-list > div:last-child { border-bottom: none; }
.ta-summary-list b { color: var(--ink); font-size: 12.5px; line-height: 1.35; text-align: right; }
.ta-validation-box { margin-top: 16px; border: 1px solid var(--line); border-radius: 13px; padding: 13px; background: #fff; }
.ta-validation-box > b { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 8px; }
.ta-validation { display: flex; align-items: flex-start; gap: 8px; font-size: 12.2px; font-weight: 700; line-height: 1.4; padding: 7px 0; color: var(--muted); }
.ta-validation.error { color: var(--red); }
.ta-validation.warning { color: var(--amber); }
.ta-validation.success { color: var(--green); }
.ta-recent { margin-top: 22px; }
.ta-recent-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ta-recent-stats > div { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px; }
.ta-recent-stats b { display: block; margin: 6px 0 8px; color: var(--navy-deep); font-size: 24px; font-weight: 900; }
.ta-filter-row { display: grid; grid-template-columns: 1.5fr 1fr 1.1fr .8fr .8fr .82fr .82fr; gap: 10px; margin-bottom: 14px; }
.ta-wide-table { overflow-x: auto; }
.ta-wide-table table { min-width: 1260px; }
.ta-title-cell b, .ta-title-cell span { display: block; }
.ta-title-cell b { color: var(--ink); font-size: 13.2px; }
.ta-title-cell span { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.ta-confirm-copy { color: var(--ink-2); font-size: 14px; line-height: 1.65; }
.ta-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ta-employee-preview { display: grid; gap: 16px; }
.ta-preview-hero { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #1e3a8a, #2563eb); }
.ta-preview-hero b { display: block; font-size: 18px; }
.ta-preview-hero span { display: block; margin-top: 4px; font-size: 12.5px; opacity: .85; }

@media (max-width: 1280px) {
  .trainer-assign-page { padding-left: 34px; padding-right: 34px; }
  .ta-desktop-shell { width: 1180px; }
}
