/* Xenetics platform - light soft-blue card UI */
:root {
  --bg: #eef3fb;
  --panel: #ffffff;
  --ink: #1f2a44;
  --ink-2: #5b6785;
  --ink-3: #95a0b8;
  --line: #e6ebf4;
  --blue: #3b7bf6;
  --blue-d: #2d62d6;
  --blue-soft: #e6efff;
  --peach: #fdebe3; --peach-i: #f2784b;
  --sky: #e4efff;   --sky-i: #3b7bf6;
  --mint: #e1f5ea;  --mint-i: #22a565;
  --lilac: #efe9ff; --lilac-i: #8a5cf6;
  --rose: #fde7ee;  --rose-i: #e0446c;
  --amber: #fff3dc; --amber-i: #d98a0b;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 6px 24px rgba(41, 72, 152, .07);
  --shadow-s: 0 2px 8px rgba(41, 72, 152, .06);
  --font: "Poppins", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-d); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
.ic { flex: none; vertical-align: middle; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #3b7bf6, #7a5cf6); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .02em; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: 10.5px; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 14px 12px 4px; }
.nav a, .nav span.soon { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: #f4f7fd; color: var(--ink); }
.nav a.on { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(59, 123, 246, .3); }
.nav span.soon { color: var(--ink-3); cursor: default; }
.nav span.soon em { margin-left: auto; font-style: normal; font-size: 10.5px; background: #f1f4fa; border-radius: 20px; padding: 1px 8px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.side-foot form { margin: 0; }
.side-foot button { all: unset; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 500; cursor: pointer; width: calc(100% - 24px); }
.side-foot button:hover { background: #fdf0f2; color: var(--rose-i); }

.main { min-width: 0; padding: 18px 28px 40px; }
.top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.menu-btn { display: none; border: 0; background: var(--panel); border-radius: 10px; padding: 8px; color: var(--ink); box-shadow: var(--shadow-s); cursor: pointer; }
.search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; background: var(--panel); border-radius: 12px; padding: 0 12px; box-shadow: var(--shadow-s); }
.search input { border: 0; outline: 0; background: transparent; padding: 10px 2px; width: 100%; font: inherit; color: var(--ink); }
.search .ic { color: var(--ink-3); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.switcher select { appearance: none; border: 0; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6785' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; padding: 10px 34px 10px 14px; border-radius: 12px; font: inherit; font-weight: 600; color: var(--ink); box-shadow: var(--shadow-s); cursor: pointer; }
.co-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); padding: 7px 14px 7px 7px; border-radius: 12px; box-shadow: var(--shadow-s); font-weight: 600; }
.round-btn { width: 40px; height: 40px; border-radius: 12px; background: var(--panel); display: grid; place-items: center; color: var(--ink-2); box-shadow: var(--shadow-s); }
.me { display: flex; align-items: center; gap: 10px; }
.me .who { line-height: 1.2; }
.me .who small { display: block; color: var(--ink-3); font-size: 11.5px; }

/* ---------- avatars / logos ---------- */
.av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; background: var(--blue); overflow: hidden; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 84px; height: 84px; font-size: 26px; }
.av.sm { width: 30px; height: 30px; font-size: 11px; }
.logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex: none; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo.lg { width: 48px; height: 48px; font-size: 15px; border-radius: 14px; }

/* ---------- layout grids ---------- */
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h .ic { color: var(--blue); }
.card-h .see { margin-left: auto; font-size: 13px; font-weight: 500; }
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h .actions { margin-left: auto; display: flex; gap: 10px; }

/* welcome banner */
.welcome { position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 26px 28px; border-radius: var(--radius); background: linear-gradient(110deg, #dfeaff 0%, #e9f1ff 55%, #f3ecff 100%); }
.welcome .ring { --p: 30; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), #fff 0); flex: none; }
.welcome .ring .av { width: 90px; height: 90px; border: 4px solid #fff; font-size: 28px; }
.welcome .pct { color: var(--blue); font-weight: 600; font-size: 13px; }
.welcome h1 { font-size: 26px; margin: 2px 0; }
.welcome h1 b { color: var(--blue); }
.welcome .deco { position: absolute; right: -30px; top: -40px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(122, 92, 246, .28), rgba(59, 123, 246, .06) 70%); }
.welcome .deco2 { position: absolute; right: 120px; bottom: -60px; width: 120px; height: 120px; border-radius: 50%; border: 14px solid rgba(242, 120, 75, .18); }
.welcome .body { position: relative; z-index: 1; }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; }
.tile .ti { width: 44px; height: 44px; border-radius: 12px; background: #fff; display: grid; place-items: center; flex: none; }
.tile .num { font-size: 24px; font-weight: 700; line-height: 1.1; }
.tile .lbl { font-size: 13px; color: var(--ink-2); }
.tile.peach { background: var(--peach); } .tile.peach .ti, .tile.peach .num { color: var(--peach-i); }
.tile.sky { background: var(--sky); } .tile.sky .ti, .tile.sky .num { color: var(--sky-i); }
.tile.mint { background: var(--mint); } .tile.mint .ti, .tile.mint .num { color: var(--mint-i); }
.tile.lilac { background: var(--lilac); } .tile.lilac .ti, .tile.lilac .num { color: var(--lilac-i); }
.tile.ghost { background: #f5f7fb; } .tile.ghost .ti, .tile.ghost .num { color: var(--ink-3); }
.tile .tag { white-space: nowrap; display: inline-block; font-size: 10.5px; background: #fff; color: var(--ink-3); border-radius: 20px; padding: 0 8px; margin-left: 4px; }

/* company cards (super admin overview) */
.co-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.co-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.co-card .row { display: flex; align-items: center; gap: 12px; }
.co-card .figs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.co-card .fig { background: #f6f8fd; border-radius: 10px; padding: 8px 10px; }
.co-card .fig b { display: block; font-size: 18px; }
.co-card .fig span { font-size: 11.5px; color: var(--ink-2); }
.co-card form { margin: 0; }

/* people strip */
.people-strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.person { min-width: 112px; text-align: center; padding: 14px 8px; border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink); }
.person:hover { border-color: #cdd9f2; color: var(--ink); }
.person .av { width: 56px; height: 56px; font-size: 18px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--blue-soft); }
.person .nm { font-weight: 500; font-size: 13px; line-height: 1.25; }
.person .ds { font-size: 11.5px; color: var(--ink-3); }

/* feed list (right column) */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.feed li { display: flex; gap: 12px; padding: 10px; border-radius: 12px; }
.feed li:hover { background: #f7f9fe; }
.feed .dot { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed .t { font-size: 13px; font-weight: 500; line-height: 1.35; }
.feed .s { font-size: 11.5px; color: var(--ink-3); }
.dot.create { background: var(--mint); color: var(--mint-i); }
.dot.update { background: var(--sky); color: var(--sky-i); }
.dot.delete { background: var(--rose); color: var(--rose-i); }
.dot.login { background: var(--lilac); color: var(--lilac-i); }
.dot.login_failed { background: var(--amber); color: var(--amber-i); }
.dot.bday { background: var(--peach); color: var(--peach-i); }
.empty { color: var(--ink-3); text-align: center; padding: 18px 8px; font-size: 13px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr:hover td { background: #fafbfe; }
.t .who { display: flex; align-items: center; gap: 10px; }
.t .who a { color: var(--ink); font-weight: 500; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 500; background: #eef2f9; color: var(--ink-2); }
.badge.blue { background: var(--sky); color: var(--sky-i); }
.badge.green { background: var(--mint); color: var(--mint-i); }
.badge.red { background: var(--rose); color: var(--rose-i); }
.badge.purple { background: var(--lilac); color: var(--lilac-i); }
.badge.amber { background: var(--amber); color: var(--amber-i); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.filters input[type=search] { min-width: 240px; }
.pager { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; font-size: 13px; }

/* ---------- forms & buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 11px; padding: 10px 16px; font: inherit; font-weight: 500; cursor: pointer; background: var(--blue); color: #fff; box-shadow: 0 4px 12px rgba(59, 123, 246, .25); }
.btn:hover { background: var(--blue-d); color: #fff; }
.btn.light { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.btn.light:hover { background: #d8e6ff; color: var(--blue-d); }
.btn.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--rose); color: var(--rose-i); box-shadow: none; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #dbe2ef; border-radius: 10px; font: inherit; color: var(--ink); background: #fbfcff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(59, 123, 246, .25); border-color: var(--blue); background: #fff; }
.field input[type=color] { padding: 4px; height: 42px; }
.t td input:not([class]):not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .t td select:not([class]) { width: 100%; min-width: 0; padding: 8px 12px; border: 1px solid #dbe2ef; border-radius: 10px; font: inherit; color: var(--ink); background: #fbfcff; }
.t td input:not([class]):not([type=checkbox]):not([type=radio]):focus, .t td select:not([class]):focus { outline: 2px solid rgba(59, 123, 246, .25); border-color: var(--blue); background: #fff; }
.t td input:not([class])::placeholder { color: var(--ink-3); }
.field .help { font-size: 12px; color: var(--ink-3); }
.field .err, .form-errors { color: var(--rose-i); font-size: 12.5px; }
.form-errors { background: var(--rose); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }

.messages { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 11px 14px; border-radius: 12px; background: var(--mint); color: #17784a; font-weight: 500; }
.messages li.error { background: var(--rose); color: var(--rose-i); }

/* profile */
.profile-head { display: flex; gap: 20px; align-items: center; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: 0; }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 10% 0%, #dfe9ff 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #efe6ff 0%, transparent 55%), var(--bg); }
.auth-card { width: 100%; max-width: 920px; display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); border-radius: 26px; box-shadow: 0 20px 60px rgba(41, 72, 152, .12); overflow: hidden; }
.auth-art { background: linear-gradient(150deg, #3b7bf6, #7a5cf6); color: #fff; padding: 44px 40px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.auth-art h2 { font-size: 26px; line-height: 1.25; }
.auth-art p { opacity: .85; margin: 0; }
.auth-art .bub { position: absolute; border-radius: 50%; border: 18px solid rgba(255, 255, 255, .12); }
.auth-art .cos { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.auth-art .cos span { background: rgba(255, 255, 255, .16); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; }
.auth-form { padding: 44px 40px; display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { justify-content: center; padding: 12px; }

/* error page */
.err-page { text-align: center; padding: 70px 20px; }
.err-page .code { font-size: 64px; font-weight: 700; color: var(--blue); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-cards { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 260px; transform: translateX(-105%); transition: transform .2s; box-shadow: 10px 0 40px rgba(0, 0, 0, .12); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-grid; }
  .main { padding: 14px 14px 32px; }
  .search { display: none; }
  .me .who { display: none; }
  .welcome { flex-direction: column; text-align: center; padding: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-form { padding: 30px 22px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 12px; gap: 10px; }
  .tile .ti { width: 36px; height: 36px; }
  .tile .num { font-size: 20px; }
  .top-right .switcher select { max-width: 150px; }
}

/* ---------- phase 2 ---------- */
.bell { position: relative; }
.bell .count { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--rose-i); color: #fff; font-size: 11px; display: grid; place-items: center; }
.punch-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.punch-card .clock { font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.punch-card .state { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 200px; }
.punch-btn { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.punch-btn.out { background: var(--peach-i); box-shadow: 0 6px 16px rgba(242, 120, 75, .3); }
.cam { display: none; flex-direction: column; gap: 12px; align-items: center; margin-top: 16px; }
.cam.on { display: flex; }
.cam video, .cam img { width: 260px; height: 260px; object-fit: cover; border-radius: 50%; background: #0d1a33; transform: scaleX(-1); border: 5px solid var(--blue-soft); }
.cam img { transform: none; }
.punch-msg { padding: 12px 14px; border-radius: 12px; font-weight: 500; display: none; }
.punch-msg.ok { display: block; background: var(--mint); color: #17784a; }
.punch-msg.bad { display: block; background: var(--rose); color: var(--rose-i); }
.month-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.dcell { border-radius: 10px; padding: 6px 0; text-align: center; font-size: 11px; background: #f6f8fd; color: var(--ink-3); }
.dcell b { display: block; font-size: 13px; color: var(--ink); }
.st-present b, .st-present { background: var(--mint); color: var(--mint-i); }
.st-late, .st-late b { background: var(--amber); color: var(--amber-i); }
.st-absent, .st-absent b { background: var(--rose); color: var(--rose-i); }
.st-leave, .st-half_leave, .st-leave b, .st-half_leave b { background: var(--lilac); color: var(--lilac-i); }
.st-wfh, .st-field, .st-wfh b, .st-field b { background: var(--sky); color: var(--sky-i); }
.st-holiday, .st-holiday b { background: #e8f7ef; color: #3c9e6a; }
.st-off { background: #f1f4fa; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.sheet { border-collapse: separate; border-spacing: 2px; font-size: 12px; }
.sheet th { font-weight: 600; color: var(--ink-3); padding: 4px; text-align: center; min-width: 28px; }
.sheet th.wk { color: var(--rose-i); }
.sheet td { text-align: center; padding: 6px 2px; border-radius: 6px; background: #f8f9fd; }
.sheet td.name { text-align: left; background: none; white-space: nowrap; padding-right: 12px; font-weight: 500; font-size: 13px; position: sticky; left: 0; background: #fff; }
.sheet td.tot { background: none; font-weight: 600; }
.sel-thumb { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.cal td { vertical-align: top; background: #f8f9fd; border-radius: 12px; height: 92px; padding: 6px 8px; }
.cal td.out { opacity: .35; }
.cal td.off { background: #f1f4fa; }
.cal td.hol { background: #e8f7ef; }
.cal td.today { outline: 2px solid var(--blue); }
.cal .dn { font-weight: 600; font-size: 12.5px; }
.cal .chip { display: block; font-size: 11px; background: var(--lilac); color: var(--lilac-i); border-radius: 6px; padding: 1px 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .hn { display: block; font-size: 11px; color: #3c9e6a; }
.bal-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bal { border-radius: 14px; padding: 14px; background: var(--sky); }
.bal b { font-size: 22px; display: block; color: var(--sky-i); }
.bal span { font-size: 12.5px; color: var(--ink-2); }
.bal.unpaid { background: #f5f7fb; } .bal.unpaid b { color: var(--ink-2); }
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.note-input { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; width: 150px; }
.tile .sub { font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 860px) { .cal td { height: 64px; padding: 4px; } .cal .chip { font-size: 10px; } }

a.tile { color: inherit; transition: transform .12s; } a.tile:hover { transform: translateY(-2px); color: inherit; }
.sheet td.st-present { background: var(--mint); color: var(--mint-i); }
.sheet td.st-late { background: var(--amber); color: var(--amber-i); font-weight: 600; }
.sheet td.st-absent { background: var(--rose); color: var(--rose-i); font-weight: 600; }
.sheet td.st-leave, .sheet td.st-half_leave { background: var(--lilac); color: var(--lilac-i); }
.sheet td.st-wfh, .sheet td.st-field { background: var(--sky); color: var(--sky-i); }
.sheet td.st-holiday { background: #e8f7ef; color: #3c9e6a; }
.sheet td.st-off { background: #eef1f7; color: var(--ink-3); }
.legend i.st-present { background: var(--mint); } .legend i.st-late { background: var(--amber); } .legend i.st-absent { background: var(--rose); }
.legend i.st-leave { background: var(--lilac); } .legend i.st-wfh { background: var(--sky); } .legend i.st-holiday { background: #d3f0df; } .legend i.st-off { background: #e3e8f1; }

/* ---------- phase 3: tasks ---------- */
.av.xs { width: 22px; height: 22px; font-size: 9px; }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: #f4f7fd; border-radius: 16px; padding: 10px; min-height: 220px; transition: background .12s; }
.col.over { background: #e4eeff; outline: 2px dashed var(--blue); }
.col header { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 4px 6px 10px; }
.col header b { margin-left: auto; background: #fff; border-radius: 20px; padding: 0 9px; font-size: 12px; color: var(--ink-2); }
.dotc { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.col-doing .dotc { background: var(--blue); } .col-review .dotc { background: var(--lilac-i); } .col-done .dotc { background: var(--mint-i); }
.drop { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.tcard { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 12px; padding: 12px; box-shadow: var(--shadow-s); color: var(--ink); border-left: 4px solid #cfd8ea; cursor: grab; }
.tcard:hover { color: var(--ink); box-shadow: 0 6px 18px rgba(41, 72, 152, .12); }
.tcard.dragging { opacity: .5; }
.tcard.p3 { border-left-color: var(--amber-i); } .tcard.p4 { border-left-color: var(--rose-i); } .tcard.p1 { border-left-color: #e3e8f1; }
.tcard .tt { font-weight: 500; line-height: 1.35; }
.tcard .tp { font-size: 11.5px; color: var(--blue); }
.tcard .tm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.tcard .due { margin-left: auto; background: #f1f4fa; border-radius: 6px; padding: 1px 7px; }
.tcard.overdue .due { background: var(--rose); color: var(--rose-i); font-weight: 600; }
.overdue-txt { color: var(--rose-i); font-weight: 600; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 7px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 500; background: #f4f7fd; }
.tabs a.on { background: var(--blue); color: #fff; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.proj { color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.proj:hover { color: var(--ink); transform: translateY(-2px); }
.proj .row { display: flex; justify-content: space-between; gap: 8px; }
.bar { height: 8px; border-radius: 6px; background: #edf1f8; overflow: hidden; margin: 6px 0 2px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #7a5cf6); border-radius: 6px; }
.people-mini { display: flex; gap: 4px; flex-wrap: wrap; }
.mytasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mytasks a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f7f9fe; color: var(--ink); }
.mytasks a:hover { background: #eef3fe; color: var(--ink); }
.mytasks .due { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(4, 78vw); } }
.mytasks .due.overdue-txt { color: var(--rose-i); }

/* ---------- phase 5: exams / student portal ---------- */
.stu-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; background: #fff; box-shadow: var(--shadow-s); position: sticky; top: 0; z-index: 20; }
.stu-main { max-width: 980px; margin: 0 auto; padding: 22px 16px 60px; }
.exam-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.exam-card .grow { flex: 1; min-width: 220px; }
.q { padding: 18px 0; border-bottom: 1px solid var(--line); }
.q:last-child { border-bottom: 0; }
.q .qn { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.q .qt { font-size: 15.5px; margin: 4px 0 12px; white-space: pre-wrap; }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.opt:hover { border-color: #c7d6f5; }
.opt input { accent-color: var(--blue); width: 18px; height: 18px; }
.opt:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.timer { position: sticky; top: 74px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border-radius: 14px; padding: 12px 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.timer .t { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--blue); }
.timer.low .t { color: var(--rose-i); }
.saved { font-size: 12px; color: var(--ink-3); }
.mark-ok { color: var(--mint-i); font-weight: 600; } .mark-bad { color: var(--rose-i); font-weight: 600; }
.qopt-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.qopt-list li.ok { color: var(--mint-i); font-weight: 600; }

.sheet td.st-half { background: #fff0d9; color: var(--amber-i); font-weight: 600; }
.legend i.st-half { background: #fff0d9; }
.sheet td a.mk { color: inherit; text-decoration: none; display: block; min-height: 1.2em; }
.sheet td a.mk:hover { outline: 2px solid var(--blue); outline-offset: -2px; }
