/* ==========================================================================
   Vestaxis Employee Portal: mock-up
   Uses the marketing site's design tokens (Elementor kit-32) so the portal
   reads as the same brand, with app chrome layered on top.
   ========================================================================== */

@import url("fonts.css");

:root {
  /* Brand: identical to site.css */
  --c-secondary: #041b47;
  --c-primary:   #6e7a84;
  --c-accent:    #ffffff2b;
  --c-orange:    #ff743d;
  --c-green:     #00bf71;
  --c-grey:      #f0f0f0;
  --c-mint:      #ceeeed;
  --c-ink:       #0b1927;
  --c-blue:      #174675;

  /* App-only additions */
  --c-canvas:    #f5f6f8;   /* page behind the cards            */
  --c-line:      #e4e7eb;   /* hairlines, table rules           */
  --c-line-soft: #eef0f3;
  --c-amber:     #d99000;   /* pending / needs attention        */
  --c-red:       #d0342c;   /* rejected / destructive           */
  --c-info:      #2f6fb0;

  --radius:      6px;
  --radius-lg:   10px;
  --shadow-sm:   0 1px 2px rgba(4, 27, 71, .06), 0 1px 3px rgba(4, 27, 71, .04);
  --shadow-md:   0 4px 16px rgba(4, 27, 71, .08);
  --shadow-lg:   0 18px 48px rgba(4, 27, 71, .18);

  --rail:        260px;
  --topbar-h:    64px;
}

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-secondary);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-family: "Urbanist", sans-serif; color: var(--c-secondary); font-weight: 700; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 21px; line-height: 1.25; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 600; }
h4 { font-size: 15px; line-height: 1.35; font-weight: 600; }
button { font: inherit; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* Visible focus for every interactive control. Keyboard users first. */
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; border-radius: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Skip link: first tab stop on every screen */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  transition: top .15s;
}
.skip-link:focus { top: 8px; text-decoration: none; }

/* --------------------------------------------------------------- buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: "Urbanist", sans-serif; font-size: 15px; font-weight: 600; line-height: 1;
  padding: 11px 18px; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--c-ink); color: #fff; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--c-blue); text-decoration: none; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

.btn--ghost { background: #fff; color: var(--c-secondary); border-color: var(--c-line); }
.btn--ghost:hover { background: var(--c-grey); color: var(--c-secondary); border-color: #d6dae0; }
.btn--quiet { background: transparent; color: var(--c-primary); border-color: transparent; padding: 8px 10px; }
.btn--quiet:hover { background: var(--c-grey); color: var(--c-secondary); }
.btn--danger { background: #fff; color: var(--c-red); border-color: #f0cfcd; }
.btn--danger:hover { background: #fdf3f2; color: var(--c-red); border-color: #e2a9a5; }
.btn--sm { font-size: 13px; padding: 8px 12px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- pills -- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; line-height: 1;
  padding: 5px 10px; border-radius: 999px;
  background: var(--c-grey); color: var(--c-primary);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--draft    { background: #eef0f3; color: #5c6873; }
.pill--pending  { background: #fdf4e3; color: var(--c-amber); }
.pill--approved { background: #e6f7f0; color: #0a7a52; }
.pill--rejected { background: #fdeeed; color: var(--c-red); }
.pill--info     { background: #eaf2fa; color: var(--c-info); }
.pill--nodot::before { display: none; }

/* ---------------------------------------------------------------- cards -- */
.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--c-line-soft);
}
.card__head h3 { display: flex; align-items: center; gap: 10px; }
.card__body { padding: 20px; }
.card__foot { padding: 14px 20px; border-top: 1px solid var(--c-line-soft); background: #fcfcfd; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.muted { color: var(--c-primary); }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }

/* ============================================================ LOGIN ====== */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
}
.auth__aside {
  position: relative; padding: 56px 64px; color: #fff; overflow: hidden;
  background-color: var(--c-secondary);
  background-image: url("../img/generated-image.png");
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth__aside::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(11,25,39,.94) 0%, rgba(4,27,71,.86) 60%, rgba(23,70,117,.78) 100%); }
.auth__aside > * { position: relative; z-index: 1; }
.auth__aside img { width: 150px; filter: brightness(0) invert(1); }
.auth__pitch h2 { color: #fff; font-size: 34px; line-height: 1.2; margin-bottom: 14px; }
.auth__pitch p { color: rgba(255,255,255,.72); max-width: 44ch; }
.auth__points { margin-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.auth__points li { display: flex; gap: 12px; align-items: flex-start; color: rgba(255,255,255,.85); }
.auth__points svg { width: 18px; height: 18px; fill: var(--c-mint); flex: none; margin-top: 2px; }
.auth__legal { color: rgba(255,255,255,.45); font-size: 12px; }

.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth__form { width: 100%; max-width: 400px; }
.auth__form h1 { margin-bottom: 6px; }
.auth__form form > p.muted { margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field > label { display: block; font-family: "Urbanist", sans-serif; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--c-primary); margin-top: 6px; }
.field .err, .err { font-size: 12px; color: var(--c-red); margin-top: 6px; font-weight: 600; }
.check[aria-invalid], .check input[aria-invalid] { outline: 2px solid var(--c-red); outline-offset: 3px; border-radius: 3px; }
.input, .select, .textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid #d6dae0; border-radius: var(--radius);
  background: #fff; color: var(--c-secondary);
  font-family: "Inter", sans-serif; font-size: 14px; line-height: 1.4;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #9aa4ae; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(23,70,117,.12);
}
.input[aria-invalid="true"] { border-color: var(--c-red); box-shadow: 0 0 0 3px rgba(208,52,44,.1); }
.textarea { resize: vertical; min-height: 90px; }
.input-group { position: relative; display: flex; }
.input-group .input { padding-right: 76px; }
.input-group button {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--c-blue); font-size: 12px; font-weight: 600;
  padding: 6px 8px; border-radius: 4px;
}
.input-group button:hover { background: var(--c-grey); }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: 13px; }
.check input { margin: 1px 0 0; width: 16px; height: 16px; accent-color: var(--c-blue); flex: none; }

.divider-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--c-primary); font-size: 12px; }
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }

.sso { display: flex; flex-direction: column; gap: 10px; }
.sso .btn svg { width: 18px; height: 18px; }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius); font-size: 13px; margin-bottom: 18px;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert--error { background: #fdeeed; color: #8f231d; border: 1px solid #f3d3d0; }
.alert--error svg { fill: var(--c-red); }
.alert--info { background: #eaf2fa; color: #204d78; border: 1px solid #cfe0f0; }
.alert--info svg { fill: var(--c-info); }
.alert--warn { background: #fdf4e3; color: #7a5200; border: 1px solid #f0dfba; }
.alert--warn svg { fill: var(--c-amber); }
.alert--ok { background: #e6f7f0; color: #0a5c3f; border: 1px solid #bfe8d7; }
.alert--ok svg { fill: #0a7a52; }
.alert[hidden] { display: none; }

/* MFA step */
.otp { display: flex; gap: 10px; }
.otp input {
  width: 52px; height: 58px; text-align: center;
  font-family: "Urbanist", sans-serif; font-size: 24px; font-weight: 700;
  border: 1px solid #d6dae0; border-radius: var(--radius); background: #fff;
}
.otp input:focus { outline: none; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(23,70,117,.12); }

.demo-creds {
  margin-top: 26px; padding: 14px 16px; border: 1px dashed #cdd3da;
  border-radius: var(--radius); background: #fbfcfd; font-size: 12.5px; color: var(--c-primary);
}
.demo-creds b { color: var(--c-secondary); }
.demo-creds code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--c-grey); padding: 1px 5px; border-radius: 3px; color: var(--c-secondary); }

/* ============================================================ APP SHELL == */
.app { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }

.rail {
  background: var(--c-secondary); color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.rail__brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: space-between; }
.rail__brand img { width: 116px; filter: brightness(0) invert(1); }
.rail__nav { padding: 14px 12px; flex: 1; overflow-y: auto; }
.rail__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); padding: 14px 10px 6px; font-weight: 600; }
.rail__link {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--radius); margin-bottom: 2px;
  color: rgba(255,255,255,.76); font-size: 14px; font-weight: 500;
  background: none; border: 0; width: 100%; text-align: left;
}
.rail__link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
/* Class rules set display, so [hidden] needs to be restated to win. */
.rail__link[hidden], .rail__label[hidden], .rail__user[hidden] { display: none; }
.rail__link.is-active { background: var(--c-blue); color: #fff; font-weight: 600; }
.rail__link svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.rail__badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--c-orange); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.rail__badge--quiet { background: rgba(255,255,255,.16); }
.rail__foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
/* Persona switch. Kept visible: the admin modules simply are not in the nav
   when you are the consultant, and a hidden switch reads as a missing feature. */
.rail__role {
  background: rgba(255,255,255,.06); border-radius: var(--radius);
  padding: 9px 11px; margin-bottom: 10px;
}
.rail__role-now { display: block; font-size: 11.5px; color: rgba(255,255,255,.55); }
.rail__role-now b { color: #fff; font-weight: 600; }
.rail__role-swap {
  margin-top: 6px; background: none; border: 0; padding: 0;
  color: var(--c-mint); font-size: 12px; font-weight: 600; font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.rail__role-swap:hover { color: #fff; }
.rail__user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); }
.rail__user:hover { background: rgba(255,255,255,.07); }
.rail__user .who { min-width: 0; }
.rail__user .who b { display: block; font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail__user .who span { font-size: 11.5px; color: rgba(255,255,255,.5); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Urbanist", sans-serif; font-weight: 700; font-size: 13px;
  color: #fff; background: var(--c-blue); object-fit: cover; position: relative;
}
.avatar--sm { width: 26px; height: 26px; font-size: 11px; }
.avatar--lg { width: 46px; height: 46px; font-size: 16px; }
.presence {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff;
  background: #b6bec6;
}
.presence--online { background: var(--c-green); }
.presence--away   { background: #e8b62c; }
.presence--dnd    { background: var(--c-red); }
.rail .presence { border-color: var(--c-secondary); }

/* ------------------------------------------------------------- main col -- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; background: #fff; border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 20;
}
.topbar__title { display: flex; flex-direction: column; min-width: 0; }
.topbar__title b { font-family: "Urbanist", sans-serif; font-size: 17px; font-weight: 700; }
.topbar__title span { font-size: 12px; color: var(--c-primary); }
.topbar__spacer { flex: 1; }
.rail-toggle, .icon-btn.rail-toggle { display: none; }   /* beats .icon-btn's display */

.search {
  position: relative; width: 300px; max-width: 34vw;
}
.search input {
  width: 100%; padding: 9px 12px 9px 34px;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-canvas); font-size: 13.5px; font-family: inherit; color: var(--c-secondary);
}
.search input:focus { outline: none; background: #fff; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(23,70,117,.1); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: #9aa4ae; }
#search-pop { width: 420px; max-height: 60vh; overflow: hidden; left: 0; right: auto; }
#search-pop .pop__list { max-height: 46vh; }
#search-pop .pop__item:hover { background: var(--c-grey); cursor: pointer; }
#search-pop .pop__item p { font-size: 13px; }
.search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 11px; color: var(--c-primary);
  background: #fff; border: 1px solid var(--c-line); border-radius: 4px; padding: 2px 5px;
}

.icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 1px solid transparent; color: var(--c-primary);
}
.icon-btn:hover { background: var(--c-grey); color: var(--c-secondary); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px; min-width: 8px; height: 8px;
  border-radius: 999px; background: var(--c-orange);
}

/* dropdown (notifications, user menu) */
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: 340px; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden;
}
.pop[hidden] { display: none; }
.pop__head { padding: 13px 16px; border-bottom: 1px solid var(--c-line-soft); display: flex; align-items: center; justify-content: space-between; }
.pop__head b { font-family: "Urbanist", sans-serif; font-size: 14px; }
.pop__list { max-height: 340px; overflow-y: auto; }
.pop__item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--c-line-soft); align-items: flex-start; }
.pop__item:last-child { border-bottom: 0; }
.pop__item.is-unread { background: #f7fafd; }
.pop__item p { font-size: 13px; }
.pop__item time { font-size: 11.5px; color: var(--c-primary); }
.pop__foot { padding: 10px 16px; text-align: center; border-top: 1px solid var(--c-line-soft); background: #fcfcfd; }
.has-pop { position: relative; }

/* ------------------------------------------------------------- view area -- */
.view { padding: 24px; flex: 1; min-width: 0; }
.view[hidden] { display: none; }
.view--flush { padding: 0; display: flex; min-height: 0; }
.wrap { max-width: 1240px; margin: 0 auto; min-width: 0; }
.grid { display: grid; gap: 18px; }
/* Grid and flex items default to min-width:auto, which lets wide content (tables,
   long project names) push the track past the viewport. Reset it so the
   overflow lands on .table-wrap, where it scrolls. */
.grid > *, .stack-16 > *, .stack-18 > *, .card, .card__body, .card__head { min-width: 0; }
.table-wrap { max-width: 100%; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2-1 { grid-template-columns: 2fr 1fr; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }
.stack-18 { display: flex; flex-direction: column; gap: 18px; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { color: var(--c-primary); margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ KPI -- */
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.kpi__label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-primary); }
.kpi__value { font-family: "Urbanist", sans-serif; font-size: 30px; font-weight: 700; line-height: 1; }
.kpi__value small { font-size: 15px; font-weight: 600; color: var(--c-primary); }
.kpi__meta { font-size: 12.5px; color: var(--c-primary); display: flex; align-items: center; gap: 6px; }
.bar { height: 6px; border-radius: 999px; background: var(--c-grey); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--c-blue); }
.bar--ok > span { background: var(--c-green); }
.bar--warn > span { background: var(--c-amber); }

/* clock widget */
.clock { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.clock .actions { margin-left: auto; }
@media (max-width: 560px) { .clock .actions { margin-left: 0; } .clock__time { font-size: 28px; } }
.clock__time { font-family: "Urbanist", sans-serif; font-size: 34px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.clock__state { font-size: 12.5px; color: var(--c-primary); }

/* ---------------------------------------------------------------- lists -- */
.tasklist li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px solid var(--c-line-soft);
}
.tasklist li:last-child { border-bottom: 0; }
.tasklist .ico {
  width: 32px; height: 32px; border-radius: var(--radius); flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: var(--c-grey);
}
.tasklist .ico svg { width: 16px; height: 16px; fill: var(--c-blue); }
.tasklist .ico--warn { background: #fdf4e3; } .tasklist .ico--warn svg { fill: var(--c-amber); }
.tasklist .ico--ok   { background: #e6f7f0; } .tasklist .ico--ok svg { fill: #0a7a52; }
.tasklist b { display: block; font-size: 13.5px; font-weight: 600; }
.tasklist span { font-size: 12.5px; color: var(--c-primary); }
.tasklist .go { margin-left: auto; align-self: center; }

.feed li { padding: 14px 0; border-bottom: 1px solid var(--c-line-soft); }
.feed li:last-child { border-bottom: 0; }
.feed .by { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.feed .by b { font-size: 13px; font-weight: 600; }
.feed .by time { font-size: 11.5px; color: var(--c-primary); }
.feed p { font-size: 13.5px; color: #46525d; }

/* --------------------------------------------------------------- tables -- */
.table-wrap { overflow-x: auto; }
.tbl { font-size: 13.5px; }
.tbl th {
  text-align: left; font-family: "Urbanist", sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--c-primary);
  padding: 11px 12px; border-bottom: 1px solid var(--c-line); white-space: nowrap; background: #fcfcfd;
}
.tbl td { padding: 12px; border-bottom: 1px solid var(--c-line-soft); vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .right { text-align: right; }

/* ------------------------------------------------------------ timesheet -- */
.ts-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--c-line-soft);
}
.weekpick { display: flex; align-items: center; gap: 4px; }
.weekpick b { font-family: "Urbanist", sans-serif; font-size: 15px; padding: 0 8px; white-space: nowrap; }

.ts { font-size: 13.5px; min-width: 880px; }
.ts th { text-align: center; padding: 10px 6px; border-bottom: 1px solid var(--c-line); font-family: "Urbanist", sans-serif; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-primary); background: #fcfcfd; }
.ts th.left, .ts td.left { text-align: left; }
.ts th small { display: block; font-size: 15px; font-weight: 700; color: var(--c-secondary); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.ts th.is-weekend, .ts td.is-weekend { background: #fafbfc; }
.ts th.is-today small { color: var(--c-blue); }
.ts td { padding: 6px 6px; border-bottom: 1px solid var(--c-line-soft); text-align: center; }
.ts tfoot td { border-bottom: 0; border-top: 2px solid var(--c-line); font-weight: 700; padding: 12px 8px; }
.ts .proj { min-width: 230px; }
.ts .task { min-width: 130px; }
.ts .type { min-width: 100px; }
.ts .proj select, .ts .task select, .ts .type select { width: 100%; }
.hr-input {
  width: 56px; padding: 8px 4px; text-align: center;
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--c-canvas); font: inherit; font-variant-numeric: tabular-nums; color: var(--c-secondary);
}
.hr-input:hover { border-color: var(--c-line); background: #fff; }
.hr-input:focus { outline: none; background: #fff; border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(23,70,117,.12); }
.hr-input[readonly] { background: transparent; color: var(--c-primary); pointer-events: none; }
.hr-input.is-over { border-color: var(--c-red); background: #fdeeed; }
.ts .rowtot { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Pin Total and the row actions so they stay readable while the day columns
   scroll horizontally on narrower screens. */
.ts .tot { position: sticky; right: 44px; background: #fff; z-index: 2; }
.ts .act { position: sticky; right: 0;    background: #fff; z-index: 2; width: 44px; }
.ts thead .tot, .ts thead .act { background: #fcfcfd; z-index: 3; }
.ts .tot { box-shadow: -10px 0 12px -10px rgba(4, 27, 71, .18); }
.ts tfoot .tot, .ts tfoot .act { background: #fff; }
.daytot { font-variant-numeric: tabular-nums; }
.daytot.is-over { color: var(--c-red); }
.daytot.is-under { color: var(--c-amber); }
.grand { font-family: "Urbanist", sans-serif; font-size: 19px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--c-primary); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* stepper for approval trail */
.trail { display: flex; flex-direction: column; gap: 0; }
.trail li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; }
.trail li:last-child { padding-bottom: 0; }
.trail li::before {
  content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--c-line);
}
.trail li:last-child::before { display: none; }
.trail .dot {
  width: 24px; height: 24px; border-radius: 50%; flex: none; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-grey); color: var(--c-primary);
}
.trail .dot svg { width: 13px; height: 13px; fill: currentColor; }
.trail .dot--done { background: #e6f7f0; color: #0a7a52; }
.trail .dot--now  { background: #fdf4e3; color: var(--c-amber); }
.trail b { font-size: 13.5px; font-weight: 600; display: block; }
.trail span { font-size: 12.5px; color: var(--c-primary); }

/* ------------------------------------------------------------ documents -- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
  background: none; border: 0; padding: 11px 14px; border-bottom: 2px solid transparent;
  font-family: "Urbanist", sans-serif; font-size: 14.5px; font-weight: 600; color: var(--c-primary);
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--c-secondary); }
.tab.is-active { color: var(--c-secondary); border-bottom-color: var(--c-blue); }
.tab .count { font-size: 11px; background: var(--c-grey); color: var(--c-primary); border-radius: 999px; padding: 2px 7px; font-weight: 700; }

.drop {
  border: 2px dashed #cdd3da; border-radius: var(--radius-lg); background: #fbfcfd;
  padding: 34px 24px; text-align: center; transition: border-color .15s, background .15s;
}
.drop.is-over { border-color: var(--c-blue); background: #f2f7fc; }
.drop svg { width: 34px; height: 34px; fill: var(--c-blue); margin: 0 auto 12px; }
.drop b { font-family: "Urbanist", sans-serif; font-size: 16px; display: block; margin-bottom: 4px; }
.drop p { font-size: 13px; color: var(--c-primary); }
.drop .btn { margin-top: 14px; }

.filelist { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.fileitem {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff;
}
.filetype {
  width: 36px; height: 36px; border-radius: var(--radius); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: "Urbanist", sans-serif; font-size: 10px; font-weight: 700; letter-spacing: .03em;
  background: var(--c-grey); color: var(--c-primary);
}
.filetype--pdf { background: #fdeeed; color: #b02a22; }
.filetype--doc { background: #eaf2fa; color: #1f5c96; }
.filetype--xls { background: #e6f7f0; color: #0a7a52; }
.filetype--img { background: #f3eefd; color: #6b3fbe; }
.filetype--ppt { background: #fdf0e8; color: #b3541e; }
.filetype--zip { background: #eef0f3; color: #4a5560; }
.filetype--eml { background: #e8f4f4; color: #0f6a6e; }
.fileitem .meta { min-width: 0; flex: 1; }
.fileitem .meta b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fileitem .meta span { font-size: 12px; color: var(--c-primary); }
.progress { height: 4px; border-radius: 999px; background: var(--c-grey); overflow: hidden; margin-top: 6px; }
.progress > span { display: block; height: 100%; background: var(--c-blue); transition: width .25s; }

.ack {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border: 1px solid #f0dfba; background: #fffdf7; border-radius: var(--radius);
}

/* ----------------------------------------------------- audit checklist -- */
.ev-row { display: flex; align-items: center; gap: 9px; padding: 1px 0; }
.ev-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--c-blue); flex: none; cursor: pointer; }
.ev-text {
  flex: 1; min-width: 0; font: inherit; font-size: 13.5px; color: var(--c-secondary);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius);
  padding: 6px 8px; transition: background .12s, border-color .12s;
}
.ev-text:hover { border-color: var(--c-line); background: #fff; }
.ev-text:focus { outline: none; border-color: var(--c-blue); background: #fff; box-shadow: 0 0 0 3px rgba(23,70,117,.1); }
.ev-row.is-done .ev-text { color: var(--c-primary); text-decoration: line-through; }
.ev-del {
  flex: none; width: 26px; height: 26px; border: 0; background: none; border-radius: 4px;
  color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; opacity: 0;
}
.ev-row:hover .ev-del, .ev-del:focus-visible { opacity: 1; }
.ev-del:hover { background: #fdeeed; color: var(--c-red); }
.ev-del svg { width: 14px; height: 14px; fill: currentColor; }
.ev-add { display: flex; gap: 8px; margin-top: 12px; }
.ev-add .input { font-size: 13.5px; padding: 8px 10px; }
.ev-empty { font-size: 13px; color: var(--c-primary); padding: 4px 0 2px; }

/* ------------------------------------------------------------- MESSAGES -- */
.chat { display: grid; grid-template-columns: 240px 1fr; flex: 1; min-height: 0; min-width: 0; }
.chat.has-thread { grid-template-columns: 240px 1fr 330px; }

.chan {
  background: var(--c-ink); color: rgba(255,255,255,.8);
  display: flex; flex-direction: column; min-height: 0;
}
.chan__head { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.chan__head b { display: block; font-family: "Urbanist", sans-serif; font-size: 15px; color: #fff; }
.chan__head span { font-size: 11.5px; color: rgba(255,255,255,.45); }
.chan__body { flex: 1; overflow-y: auto; padding: 10px 8px 20px; }
.chan__group { padding: 12px 8px 4px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.38); font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.chan__group button { background: none; border: 0; color: rgba(255,255,255,.5); font-size: 14px; line-height: 1; padding: 2px 5px; border-radius: 4px; }
.chan__group button:hover { background: rgba(255,255,255,.1); color: #fff; }
.chan__item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 7px 10px; border-radius: var(--radius); border: 0; background: none;
  color: rgba(255,255,255,.72); font-size: 14px; font-family: inherit;
}
.chan__item:hover { background: rgba(255,255,255,.07); color: #fff; }
.chan__item.is-active { background: var(--c-blue); color: #fff; font-weight: 600; }
.chan__item.is-unread { color: #fff; font-weight: 700; }
.chan__item .hash { opacity: .5; font-weight: 400; }
.chan__item .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan__item .badge {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px;
  background: var(--c-orange); color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.chan__item .pdot { width: 8px; height: 8px; border-radius: 50%; background: #6b7783; flex: none; }
.chan__item .pdot.online { background: var(--c-green); }
.chan__item .pdot.away { background: #e8b62c; }
.chan__item .pdot.dnd { background: var(--c-red); }

.room { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.room__head {
  flex: none; padding: 12px 20px; border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 14px;
}
.room__head h3 { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.room__head .topic {
  font-size: 12.5px; color: var(--c-primary);
  border-left: 1px solid var(--c-line); padding-left: 14px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.room__head .spacer { flex: 1; }
.facepile { display: flex; }
.facepile .avatar { border: 2px solid #fff; margin-left: -8px; }
.facepile .avatar:first-child { margin-left: 0; }
.facepile .more {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px;
  background: var(--c-grey); color: var(--c-primary); font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.pinned {
  display: flex; align-items: center; gap: 10px; padding: 9px 20px;
  background: #fffdf7; border-bottom: 1px solid #f0dfba; font-size: 12.5px; color: #7a5200;
}
.pinned svg { width: 14px; height: 14px; fill: var(--c-amber); flex: none; }

.msgs { flex: 1; overflow-y: auto; padding: 18px 20px 8px; }
.daysep { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; }
.daysep::before, .daysep::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.daysep span { font-size: 12px; font-weight: 600; color: var(--c-primary); background: #fff; padding: 2px 10px; border: 1px solid var(--c-line); border-radius: 999px; }
.newsep { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.newsep::before, .newsep::after { content: ""; flex: 1; height: 1px; background: var(--c-orange); }
.newsep span { font-size: 11px; font-weight: 700; color: var(--c-orange); text-transform: uppercase; letter-spacing: .06em; }

.msg { display: flex; gap: 11px; padding: 5px 8px; border-radius: var(--radius); position: relative; }
.msg:hover { background: #fafbfc; }
.msg.is-compact { padding-top: 1px; padding-bottom: 1px; }
.msg__gutter { width: 34px; flex: none; display: flex; justify-content: center; }
.msg.is-compact .msg__gutter time { font-size: 10.5px; color: transparent; }
.msg.is-compact:hover .msg__gutter time { color: var(--c-primary); }
.msg__body { min-width: 0; flex: 1; }
.msg__who { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; }
.msg__who b { font-family: "Urbanist", sans-serif; font-size: 14.5px; font-weight: 700; }
.msg__who time { font-size: 11.5px; color: var(--c-primary); }
.msg__who .tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--c-grey); color: var(--c-primary); padding: 2px 6px; border-radius: 3px; }
.msg__text { font-size: 14px; color: #2c3742; word-wrap: break-word; }
.msg__text code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; background: var(--c-grey); padding: 1px 5px; border-radius: 3px; color: #b02a22; }
.msg__text pre {
  margin: 6px 0 0; padding: 12px 14px; background: #f7f8fa; border: 1px solid var(--c-line);
  border-radius: var(--radius); overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #2c3742;
}
.mention { background: #eaf2fa; color: var(--c-blue); font-weight: 600; padding: 1px 4px; border-radius: 3px; }
.mention.is-me { background: #fdf4e3; color: #7a5200; }

.attach {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 10px; max-width: 340px;
  padding: 10px 12px; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff;
}
.attach b { font-size: 13px; font-weight: 600; display: block; }
.attach span { font-size: 11.5px; color: var(--c-primary); }

.reacts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.react {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; border: 1px solid var(--c-line);
  background: #fff; font-size: 12px; color: var(--c-primary); line-height: 1.6;
}
.react:hover { border-color: var(--c-blue); }
.react.is-mine { background: #eaf2fa; border-color: #bcd4ea; color: var(--c-blue); font-weight: 600; }
.react--add { color: var(--c-primary); padding: 2px 7px; }
.react--add svg { width: 13px; height: 13px; fill: currentColor; }

.threadlink {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 4px 8px; border-radius: var(--radius);
  color: var(--c-blue); font-size: 12.5px; font-weight: 600; font-family: inherit;
}
.threadlink:hover { background: #eaf2fa; }
.threadlink .faces { display: flex; }
.threadlink .faces .avatar { border: 1.5px solid #fff; margin-left: -6px; }
.threadlink .faces .avatar:first-child { margin-left: 0; }

.msg__tools {
  position: absolute; right: 10px; top: -12px; display: none; gap: 2px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 2px;
}
.msg:hover .msg__tools { display: flex; }
.msg__tools button { width: 28px; height: 28px; border: 0; background: none; border-radius: 4px; color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; }
.msg__tools button:hover { background: var(--c-grey); color: var(--c-secondary); }
.msg__tools svg { width: 15px; height: 15px; fill: currentColor; }

.typing { padding: 0 28px 6px; font-size: 12.5px; color: var(--c-primary); height: 20px; }
.typing i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--c-primary); margin-right: 2px; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; margin-right: 6px; }
@keyframes blink { 0%,60%,100% { opacity: .25 } 30% { opacity: 1 } }

.composer { flex: none; padding: 0 20px 18px; }
.composer__box { border: 1px solid var(--c-line); border-radius: var(--radius-lg); background: #fff; overflow: hidden; }
.composer__box:focus-within { border-color: var(--c-blue); box-shadow: 0 0 0 3px rgba(23,70,117,.1); }
.composer__fmt { display: flex; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--c-line-soft); }
.composer__fmt button { width: 28px; height: 28px; border: 0; background: none; border-radius: 4px; color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.composer__fmt button:hover { background: var(--c-grey); color: var(--c-secondary); }
.composer__fmt svg { width: 15px; height: 15px; fill: currentColor; }
.composer__fmt .sep { width: 1px; background: var(--c-line); margin: 4px 6px; }
.composer textarea {
  width: 100%; border: 0; padding: 12px 14px; resize: none; font: inherit; font-size: 14px;
  color: var(--c-secondary); min-height: 46px; max-height: 200px; display: block;
}
.composer textarea:focus { outline: none; }
.composer__bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px; }
.composer__bar .spacer { flex: 1; }
.composer__hint { font-size: 11.5px; color: var(--c-primary); padding: 6px 4px 0; }

.thread { border-left: 1px solid var(--c-line); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.thread[hidden] { display: none; }   /* a class rule would otherwise beat [hidden] */
.thread__head { flex: none; padding: 13px 16px; border-bottom: 1px solid var(--c-line); display: flex; align-items: center; justify-content: space-between; }
.thread__body { flex: 1; overflow-y: auto; padding: 14px 12px; }
.thread__count { font-size: 12px; color: var(--c-primary); padding: 6px 10px 10px; border-bottom: 1px solid var(--c-line-soft); margin-bottom: 10px; }

/* ------------------------------------------------------------- misc bits -- */
.empty { text-align: center; padding: 44px 20px; color: var(--c-primary); }
.empty svg { width: 40px; height: 40px; fill: #c6ccd3; margin: 0 auto 12px; }
.empty b { display: block; font-family: "Urbanist", sans-serif; font-size: 16px; color: var(--c-secondary); margin-bottom: 4px; }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; min-width: 280px; max-width: 380px;
  padding: 13px 15px; border-radius: var(--radius); background: var(--c-ink); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: toastIn .2s ease-out;
}
.toast svg { width: 17px; height: 17px; fill: var(--c-green); flex: none; margin-top: 1px; }
.toast--warn svg { fill: #ffcf5c; }
.toast--error svg { fill: #ff8a80; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

.modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__scrim { position: absolute; inset: 0; background: rgba(4, 27, 71, .45); }
.modal__box { position: relative; width: 100%; max-width: 520px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.modal__head { padding: 18px 22px; border-bottom: 1px solid var(--c-line-soft); display: flex; align-items: center; justify-content: space-between; }
.modal__body { padding: 22px; max-height: 62vh; overflow-y: auto; }
.modal__foot {
  padding: 16px 22px; border-top: 1px solid var(--c-line-soft);
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; background: #fcfcfd;
}
.modal__hint { margin-right: auto; }
@media (max-width: 560px) { .modal__hint { display: none; } }

/* idle / session banner */
.session-bar {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 9px 16px; background: #fdf4e3; color: #7a5200; font-size: 13px; border-bottom: 1px solid #f0dfba;
}
.session-bar[hidden] { display: none; }
.session-bar button { background: none; border: 0; color: #7a5200; font-weight: 700; text-decoration: underline; }

/* ==================================================== responsive ========= */
@media (max-width: 1180px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--2-1 { grid-template-columns: 1fr; }
  .chat.has-thread { grid-template-columns: 240px 1fr; }
  .thread { position: fixed; inset: var(--topbar-h) 0 0 auto; width: min(380px, 92vw); z-index: 80; box-shadow: var(--shadow-lg); }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .grid--3 { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; }
  .rail {
    position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 120;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  .rail.is-open { transform: none; }
  .rail-toggle, .icon-btn.rail-toggle { display: inline-flex; }
  .scrim { position: fixed; inset: 0; background: rgba(4,27,71,.4); z-index: 110; }
  .scrim[hidden] { display: none; }
  .search { width: 180px; }
  .chat, .chat.has-thread { grid-template-columns: 1fr; }
  .chan { display: none; }
  .chat.show-channels .chan { display: flex; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 90; }
}
@media (max-width: 680px) {
  .view { padding: 16px; }
  /* Room header: keep the channel name on one line, drop the extras */
  .room__head { padding: 10px 12px; gap: 8px; }
  .room__head .topic, .room__head .facepile { display: none; }
  .room__head h3 { white-space: nowrap; font-size: 15px; }
  .room__head .icon-btn[aria-label="Start a call"],
  .room__head .icon-btn[aria-label="Start a huddle"] { display: none; }
  .msgs { padding: 14px 12px 6px; }
  .composer { padding: 0 12px 12px; }
  .pinned { padding: 8px 12px; }
  .grid--4 { grid-template-columns: 1fr; }
  .search { display: none; }
  .topbar { padding: 0 14px; gap: 8px; }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .page-head { flex-direction: column; }
  .modal__box { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
