/* Werkflow HR&Payroll — WordPress-style shell + Lite-style login (precompiled) */
:root {
  --blue: #0059FF;
  --blue-hover: #0046cc;
  --mint: #7bf1a8;
  --mint-ink: #06261a;
  --green: #059669;
  --forest: #064e3b;
  --cream: #fff9e1;
  --navy: #151b2d;
  --navy-hover: #1e293b;
  --ink: #1d2327;
  --muted: #646970;
  --line: #dcdcde;
  --border: #dcdcde;
  --bg: #f0f0f1;
  --card: #ffffff;
  --sidebar: #1d2327;
  --sidebar-text: #a7aaad;
  --topbar: #1d2327;
  --amber: #d97706;
  --violet: #7c3aed;
  --danger: #d63638;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 1px rgba(0,0,0,.04);
  --sans: Inter, system-ui, "Segoe UI", Arial, Helvetica, sans-serif;
  --serif: Inter, system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --space: 8px;
}
* { box-sizing: border-box; }
body.app-body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -.01em;
  height: 100%;
  overflow: hidden;
}
body.app-body.guest-body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
html { color-scheme: light; height: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[x-cloak] { display: none !important; }

.shell { display: grid; grid-template-columns: 200px 1fr; height: 100%; min-height: 100vh; overflow: hidden; }
.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.sidebar.open { display: flex; }
.sidebar-scrim { display: none; }
.brand-block { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 14px 12px; background: #101517; flex-shrink: 0; }
.brand-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; background: #fff; padding: 2px; }
.brand-word { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.brand-block strong, .top-title { color: #fff; letter-spacing: -.02em; font-size: 13px; font-weight: 600; line-height: 1.2; }
.brand-block span, .top-title span { color: #fff; font-weight: 600; }
.brand-block .version-chip { display: none; }
.org-chip {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px; margin: 0; border-bottom: 1px solid rgba(255,255,255,.06);
}
.user-chip { display: flex; gap: 10px; align-items: center; }
.org-initials, .avatar { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.avatar { background: #3c434a; color: #fff; }
.org-chip strong, .aside-foot strong { color: #fff; font-size: 12px; display: block; }
.org-chip small, .aside-foot small { font-size: 11px; color: var(--sidebar-text); }
.nav { display: flex; flex-direction: column; gap: 0; overflow-x: hidden; overflow-y: auto; padding: 8px 0; flex: 1; min-height: 0; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-thumb { background: #3c434a; border-radius: 8px; }
.nav::-webkit-scrollbar-track { background: #101517; }
.nav small { display: block; color: #72777c; margin: 14px 12px 6px; font-size: 10px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--sidebar-text);
  padding: 10px 12px;
  border-radius: 0;
  font-weight: 500;
  border-left: 4px solid transparent;
}
.nav a:hover { background: #2c3338; color: #fff; text-decoration: none; }
.nav a.active { background: var(--blue); color: #fff; border-left-color: #72aee6; }
.nav a.active svg, .nav a:hover svg { color: #fff; }
.aside-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.06); color: var(--sidebar-text); flex-shrink: 0; }
.aside-foot .nav-theme { background: transparent; border: 0; color: var(--sidebar-text); display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 0; }
.aside-version { font-size: 11px; color: #72777c; margin: 8px 0 0; }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: var(--bg); }
.topbar {
  display: flex; align-items: center; gap: 12px;
  background: var(--topbar); color: #fff;
  padding: 0 16px; min-height: 46px;
  border-bottom: 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
}
.top-logo { width: 24px; height: 24px; border-radius: 4px; object-fit: contain; background: #fff; }
.top-copy { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.top-kicker { display: none; }
.top-company { margin: 0; font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-meta { color: #a7aaad; font-size: 12px; margin-left: auto; }
.top-search {
  flex: 1; max-width: 420px; margin: 0 12px;
  position: relative;
}
.top-search input {
  width: 100%; height: 32px; border-radius: 4px; border: 0;
  padding: 0 12px 0 34px; background: #2c3338; color: #fff;
}
.top-search input::placeholder { color: #a7aaad; }
.top-search svg { position: absolute; left: 10px; top: 7px; color: #a7aaad; }
.top-search-results {
  position: absolute; left: 0; right: 0; top: 38px; z-index: 40;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,.12); max-height: 280px; overflow: auto;
}
.top-search-results a { display: block; padding: 10px 12px; color: var(--ink); border-bottom: 1px solid #f0f0f1; }
.top-search-results a:hover { background: #f6f7f7; text-decoration: none; }
.top-user { margin-left: 0; }
.avatar-menu {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0; color: #fff; padding: 4px 0;
}
.top-user-copy strong { color: #fff; font-size: 13px; }
.top-user-copy small { color: #a7aaad; }
.content { padding: 20px 24px 40px; flex: 1; min-height: 0; overflow-y: auto; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 4px;
  padding: 16px; box-shadow: var(--shadow);
}
.widget-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.widget-third { grid-column: span 4; }
.widget-aside, .widget-main { grid-column: span 6; }
.hero-stat { font-size: 28px; font-weight: 700; color: var(--ink); display: block; margin: 6px 0; }
.card small { color: var(--muted); letter-spacing: .04em; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 4px; border: 1px solid transparent; padding: 8px 14px; font-weight: 600;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); text-decoration: none; color: #fff; }
.btn-secondary { background: #f6f7f7; color: var(--ink); border-color: #c3c4c7; }
.btn-danger { background: #f6f7f7; color: var(--danger); border-color: #c3c4c7; }
.btn-danger:hover { background: #fcf0f1; border-color: var(--danger); }
.btn-signin {
  background: var(--mint) !important; color: var(--mint-ink) !important; border-color: var(--mint) !important;
  font-weight: 700; height: 48px; border-radius: 12px; font-size: 16px;
}
.btn-block { width: 100%; }
.nav-ico { flex-shrink: 0; opacity: .9; }
.nav a.active .nav-ico { opacity: 1; }
.menu-btn {
  display: none;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 4px;
  background: #2c3338;
  color: #fff;
  place-items: center;
  padding: 0;
}
.logout-form { margin-left: 0; }
.note-panel { margin: 12px 28px 0; }
.theme-form { margin-left: auto; }
.top-user { display: flex; align-items: center; gap: 10px; position: relative; }
.top-user-copy strong { display: block; font-size: 13px; font-weight: 650; }
.top-user-copy small { display: flex; align-items: center; gap: 6px; color: #a7aaad; font-size: 11px; }
.avatar-menu .chev { color: #a7aaad; }
.user-menu { position: absolute; right: 0; top: 44px; z-index: 30; min-width: 260px; display: grid; gap: 10px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
.role-badge { font-weight: 600; }
.role-badge.owner { color: #72aee6; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background-color: #0b1220;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.login-page.single { grid-template-columns: 1fr; }
.login-panel {
  width: 420px;
  max-width: calc(100vw - 32px);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(21, 27, 45, .92);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  padding: 36px 32px 22px;
  color: #fff;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
}
.login-panel.narrow { max-width: 460px; width: 100%; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.login-brand img { width: 52px; height: 52px; object-fit: contain; border-radius: 14px; background: #fff; padding: 6px; }
.login-brand strong { color: #fff; font-size: 20px; letter-spacing: -.02em; }
.login-brand span { color: #fff; }
.login-panel h1 { font-family: var(--sans); font-size: 40px; margin: 8px 0 4px; text-align: center; font-weight: 700; letter-spacing: -.03em; }
.login-panel > p { color: #c5c8ce; margin: 0 0 10px; text-align: center; }
.login-aside { display: none; }
.login-foot { color: #d7dbe2; font-size: 12px; margin-top: 18px; font-family: var(--mono); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-from-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; opacity: .92; }
.login-panel label { color: #d3d6dc; }
.login-panel input, .login-panel select, .login-panel textarea {
  background: var(--cream);
  color: #1f2937;
  border: 0;
  border-radius: 12px;
  height: 46px;
}
.login-panel .field { position: relative; }
.login-panel .field .icon { position: absolute; left: 12px; top: 38px; color: #9ca3af; width: 18px; height: 18px; pointer-events: none; }
.login-panel .field input { padding-left: 40px; }
.login-panel .toggle-pw {
  position: absolute; right: 10px; top: 34px;
  border: 0; background: transparent; color: #6b7280;
  width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
}
.login-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #d1d5db; }
.login-row label { display: flex; align-items: center; gap: 8px; font-weight: 500; color: #d1d5db; }
.login-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--mint); }
.login-row a, .login-mint-link { color: var(--mint); font-weight: 600; }
.login-quiet { color: #9ca3af; font-size: 13px; }
.login-panel .btn-primary, .login-panel .btn-signin {
  background: var(--mint);
  color: var(--mint-ink);
  border-color: var(--mint);
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
}
.login-panel .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.2); }
.login-panel .alert { color: #111827; }
.login-panel a { color: var(--mint); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: #ecfdf5; color: var(--forest); font-size: 10px; font-weight: 800; white-space: nowrap; }
.pill.amber { background: #fff7ed; color: #c2410c; }
.pill.rose { background: #fff1f2; color: #be123c; }
.pill.slate { background: #f1f5f9; color: #334155; }
.pill.navy { background: #eef2ff; color: #1e3a8a; }
.check-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.check-list li { color: #d8e4f5; font-size: 13px; }

.page-head { margin: 0 0 24px; }
.page-head small { color: var(--green); font-weight: 800; letter-spacing: 1.5px; font-size: 10px; text-transform: uppercase; }
.page-head h1 { margin: 6px 0 5px; font-size: 26px; letter-spacing: -.7px; font-weight: 750; }
.page-head p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 8px 0 16px; }
.stat { background: var(--card); border: 1px solid transparent; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat small { display: block; font-size: 10px; font-weight: 800; color: #6b7280; letter-spacing: .8px; }
.stat strong { display: block; font-size: 25px; margin: 12px 0 5px; letter-spacing: -.03em; }
.stat span { font-size: 11px; color: var(--muted); }
.stat.navy strong { color: #1f2937; }
.stat.amber strong { color: var(--amber); }
.stat.violet strong { color: var(--violet); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2, .section-head h2 { font-size: 12px; margin: 0 0 14px; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; font-weight: 800; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.row-line { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.row-line:last-child { border-bottom: 0; }
.row-line small { display: block; color: var(--muted); font-size: 11px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: #8a9399; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: transparent; }
.table small { display: block; color: var(--muted); }
.warn-row { background: #fff8ee; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs button, .tab-link { padding: 11px 16px; border: 0; background: transparent; color: var(--muted); font-size: 13px; border-radius: 0; display: inline-block; text-decoration: none; cursor: pointer; }
.tabs button.active, .tab-link.active { color: var(--navy); font-weight: 650; border-bottom: 2px solid var(--navy); }
.form-grid, .stack { display: grid; gap: 12px; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid label, .stack label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: #4b5563; }
.form-grid .wide { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  padding: 0 12px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #6ee7b7;
  box-shadow: 0 0 0 3px rgba(125, 255, 176, .38);
}
.btn, .button {
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  height: 40px;
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
}
.btn:hover, .button:hover { text-decoration: none; background: var(--blue-hover); color:#fff; }
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-secondary, .button.secondary { background: #fff; color: #374151; border-color: #e5e7eb; }
.btn-secondary:hover, .button.secondary:hover { background: #f8faf9; }
.btn-danger { background: #f6f7f7; border-color: #c3c4c7; color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-block { width: 100%; }
.btn-widget { margin-left: 8px; }
.plus-mint {
  width: 18px; height: 18px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #22c55e; font-size: 16px; font-weight: 700; line-height: 1;
}
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; background: #fff; box-shadow: var(--shadow); }
.alert.success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; box-shadow: none; }
.alert.error { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; box-shadow: none; }
.alert.info { background: #ecfdf5; color: #047857; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.5; }
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calc-grid > div { min-width: 0; }
.calc-grid > div span { display: block; font-size: 11px; color: var(--muted); }
.calc-grid > div strong { display: block; margin-top: 4px; font-size: 16px; overflow-wrap: anywhere; word-break: break-word; }
.calc-grid .net { grid-column: 1 / -1; background: #ecfdf5; padding: 12px; border-radius: 12px; }
.security-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.otp { letter-spacing: 8px; font-size: 24px; text-align: center; }
.catalog { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.toolbar-form { display: flex; gap: 10px; margin-bottom: 16px; }
.toolbar-form input { max-width: 360px; }
.mini-input { width: 120px; height: 34px; }
.inline-actions { display: inline-flex; gap: 6px; align-items: center; }
code { font-family: var(--mono); font-size: 11px; background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }

.widget-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.widget-main { grid-column: span 7; }
.widget-aside { grid-column: span 5; }
.widget-third { grid-column: span 4; }
.widget-half { grid-column: span 6; }
.widget-full { grid-column: span 12; }
.widget-grid > .card { margin-bottom: 0; }
.metric { font-size: 34px; font-weight: 800; letter-spacing: -.04em; display: block; margin: 8px 0 10px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; font-size: 12px; margin: 8px 0; color: #4b5563; }
.bar { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--forest); border-radius: 99px; }
.bar.thin { height: 4px; }
.bar.thin > span { background: #86efac; }
.accent-card { border-left: 6px solid var(--mint); }
.accent-card.slate { border-left-color: var(--navy); }
.task-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; display: inline-block; margin-right: 8px; }
.widget-picker { position: absolute; right: 32px; top: 80px; width: 320px; z-index: 30; }
.hero-stat { font-size: 28px; font-weight: 800; letter-spacing: -.03em; display: block; margin: 6px 0 4px; }
.payroll-period { display: block; font-size: 18px; font-weight: 750; margin: 0 0 8px; letter-spacing: -.02em; }

.version-chip { color: #9ca3af; font-size: 10px; }
.app-foot { padding: 12px 32px 24px; color: var(--muted); font-size: 11px; flex-shrink: 0; }
.avatar-img, .avatar-fallback { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; object-fit: cover; }
.avatar-fallback { background: #111827; color: var(--mint); font-weight: 800; letter-spacing: .04em; }
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kanban-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 220px; }
.kanban-col h3 { margin: 0 0 10px; font-size: 13px; }
.kanban-card { display: block; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: var(--bg); color: inherit; }
.chat-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.chat-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 10px; color: inherit; }
.chat-list a.active { background: var(--navy); color: #fff; }
.file-card { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.landing-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.photo-meta { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* Task console — stacked accordion pills */
.task-console { max-width: 920px; margin: 8px auto 0; }
.task-console-head { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.task-new-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 22px 0 16px;
  background: var(--navy); color: #fff; border: 0; border-radius: 999px;
  font-weight: 600; font-size: 14px; letter-spacing: -.01em;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .18);
}
.task-new-btn:hover { background: #0b1220; text-decoration: none; color: #fff; }
.task-new-plus {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #22c55e; font-size: 20px; font-weight: 700; line-height: 1;
}
.task-lanes { display: grid; gap: 14px; }
.task-lane { display: grid; gap: 10px; }
.task-bar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 56px; padding: 0 22px 0 20px;
  background: #fff; border: 0; border-radius: 999px;
  box-shadow: var(--shadow);
  color: #111827; text-align: left;
}
.task-bar:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, .1); }
.task-bar-left { display: inline-flex; align-items: center; gap: 10px; }
.task-bar-left strong { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.task-status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.task-count {
  min-width: 28px; height: 22px; padding: 0 8px;
  border-radius: 999px; background: #f3f4f6; color: #4b5563;
  font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.task-chevron { transition: transform .15s ease; flex-shrink: 0; }
.task-chevron.is-open { transform: rotate(180deg); }
.task-lane-body {
  background: #fff; border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px; color: inherit;
}
.task-row:hover { background: #f9fafb; text-decoration: none; }
.task-row.is-express { background: #fff1f2; }
.task-row-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.task-row-copy strong { font-size: 14px; }
.task-row-copy small { color: var(--muted); font-size: 12px; }
.task-empty { padding: 12px 16px; margin: 0; }
.task-express-mark {
  width: 8px; height: 8px; border-radius: 50%; background: var(--danger);
  box-shadow: 0 0 0 3px #fecaca; flex-shrink: 0;
}
.task-express-label {
  display: inline-flex; align-items: center;
  background: #fee2e2; color: #b91c1c; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 8px;
}
.task-priority-toggle { display: flex; gap: 8px; }
.task-priority-opt {
  display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink);
}
.task-priority-opt input { width: auto; height: auto; }
.task-priority-opt.express { border-color: #fecaca; color: #b91c1c; }
.task-modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 24px; }
.task-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); }
.task-modal-card {
  position: relative; z-index: 1; width: min(520px, 100%);
  background: #fff; border-radius: 20px; padding: 24px;
  box-shadow: 0 24px 50px rgba(15, 23, 42, .2);
}
.task-modal-card h2 { margin: 0; }
.task-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.directory-card { display: flex; gap: 14px; align-items: center; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: inherit; box-shadow: none; }
.directory-card:hover { border-color: #cbd5e1; text-decoration: none; box-shadow: var(--shadow); }
.directory-card strong { display: block; font-size: 15px; }
.directory-card small { display: block; color: var(--muted); }
.profile-hero { display: flex; gap: 20px; align-items: center; }

.chat-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 148px);
  background: var(--card);
  border: 1px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.chat-channels { border-right: 1px solid var(--line); padding: 16px 12px; background: #f8faf9; }
.chat-channels-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.chat-channels-head strong { font-size: 11px; letter-spacing: .1em; color: var(--muted); font-weight: 800; }
.chat-new-public { display: flex; gap: 6px; }
.chat-new-public input { flex: 1; min-width: 0; }
.chat-plus { width: 32px; height: 32px; border: 0; border-radius: 8px; background: #22c55e; color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.chat-channel { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: inherit; font-size: 13.5px; }
.chat-channel:hover { background: #eef2f1; text-decoration: none; }
.chat-channel.active { background: var(--navy); color: #fff; }
.chat-channel.active .chat-hash, .chat-channel.active .chat-lock { color: #fff; }
.chat-hash { color: var(--muted); font-weight: 600; }
.chat-lock { color: #ca8a04; flex-shrink: 0; }
.chat-private-form { margin-top: 16px; display: grid; gap: 8px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-main-head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-main-head h2 { margin: 0; font-size: 16px; text-transform: none; letter-spacing: -.02em; color: var(--ink); font-weight: 700; display: flex; align-items: center; gap: 8px; }
.chat-thread { flex: 1; padding: 16px 18px; overflow: auto; max-height: none; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 10px; }
.chat-msg small { display: block; color: var(--muted); font-size: 11px; }
.chat-msg p { margin: 4px 0 0; }
.chat-empty { color: var(--muted); margin: 40px 0; text-align: center; }
.chat-img { max-width: 280px; border-radius: 10px; margin-top: 6px; }
.chat-composer { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.chat-composer-row { display: flex; align-items: flex-end; gap: 8px; }
.chat-composer-row textarea { flex: 1; min-height: 42px; }
.chat-attach, .chat-tool {
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; display: grid; place-items: center; color: #4b5563; flex-shrink: 0;
}
.chat-attach input { display: none; }
.chat-send {
  background: var(--navy); color: #fff; border: 0; border-radius: 10px;
  padding: 0 16px; height: 40px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px;
}
.chat-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-picker button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 8px; }

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101217;
  --card: #181c24;
  --ink: #eef1f4;
  --muted: #9aa3b2;
  --line: #2a3140;
  --border: #2a3140;
  --sidebar: #14181f;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 28px rgba(0,0,0,.22);
}
html[data-theme="dark"] .sidebar { color: #9aa3b2; }
html[data-theme="dark"] .nav a { color: #c3cad6; }
html[data-theme="dark"] .nav a:hover, html[data-theme="dark"] .nav-theme:hover { background: #1f2530; color: #fff; }
html[data-theme="dark"] .nav a.active, html[data-theme="dark"] .nav a.active:hover { background: #0f172a; color: #fff; }
html[data-theme="dark"] .nav-theme { color: #c3cad6; }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: #12161d; color: #eef1f4; border-color: #2a3140;
}
html[data-theme="dark"] .menu-btn { background: #181c24; color: #eef1f4; border-color: #2a3140; }
html[data-theme="dark"] .table th { background: transparent; color: #9aa3b2; }
html[data-theme="dark"] .btn-secondary { background: #181c24; color: #d5e4f7; border-color: #2a3140; }
html[data-theme="dark"] .bar { background: #2a3140; }
html[data-theme="dark"] .aside-foot strong, html[data-theme="dark"] .brand-block strong, html[data-theme="dark"] .top-company { color: #eef1f4; }
html[data-theme="dark"] .task-bar, html[data-theme="dark"] .task-lane-body, html[data-theme="dark"] .task-modal-card { background: #181c24; color: #eef1f4; }
html[data-theme="dark"] .task-row:hover { background: #1f2530; }
html[data-theme="dark"] .chat-channels { background: #14181f; }
html[data-theme="dark"] .chat-attach, html[data-theme="dark"] .chat-tool, html[data-theme="dark"] .chat-picker button { background: #181c24; color: #c3cad6; border-color: #2a3140; }
html[data-theme="dark"] .directory-card { background: #181c24; }
html[data-theme="dark"] .tabs button.active, html[data-theme="dark"] .tab-link.active { color: #fff; border-bottom-color: #fff; }
html[data-theme="dark"] .history-item::before { background: #a7f3d0; }
html[data-theme="dark"] .pill.slate { background: #1f2530; color: #c3cad6; }
html[data-theme="dark"] .pill.navy { background: #1e293b; color: #c7d2fe; }

.punch-hero-card { padding: 28px; }
.punch-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.punch-date { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.punch-hello { margin: 0 0 8px; font-size: 28px; font-weight: 750; letter-spacing: -.03em; color: var(--ink); }
.punch-status { margin: 0; font-size: 15px; color: #4b5563; }
.punch-actions { display: flex; gap: 10px; align-items: center; }
.btn-punch-mint, .btn-punch-navy, .btn-punch-idle, .btn-punch-in {
  min-width: 112px; height: 42px; border-radius: 12px; font-weight: 650;
}
.btn-punch-mint { background: #a7f3d0; color: #111827; border-color: #a7f3d0; }
.btn-punch-mint:hover, .btn-punch-mint:disabled { background: #a7f3d0; color: #111827; opacity: 1; cursor: default; }
.btn-punch-navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-punch-in { background: #10b981; color: #fff; border-color: #10b981; }
.btn-punch-in:hover { background: #059669; color: #fff; border-color: #059669; }
.btn-punch-idle { background: #e5e7eb; color: #6b7280; border-color: #e5e7eb; cursor: default; }
.whos-in-card thead th { font-size: 11px; letter-spacing: .06em; color: #9ca3af; font-weight: 700; }
.punch-empty { text-align: center; padding: 36px 12px !important; }
.whos-in-card > h2 {
  text-transform: none; letter-spacing: -.02em; font-size: 18px; font-weight: 750;
  color: var(--ink); margin-bottom: 16px;
}
.punch-hours { color: var(--muted); }
.punch-edit {
  background: none; border: 0; color: #374151; font-weight: 600; height: auto; padding: 0;
  box-shadow: none;
}
.punch-edit:hover { background: none; text-decoration: underline; }
.punch-edit-form { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.punch-edit-form input[type="time"] { width: 120px; height: 34px; }
.whos-in-foot { margin: 16px 0 0; color: var(--muted); font-size: 12px; }
.task-clip {
  display: inline-flex; align-items: center; gap: 4px;
  color: #6b7280; font-size: 12px; font-weight: 650; flex-shrink: 0;
}
.history-timeline { display: grid; gap: 0; margin-top: 8px; }
.history-item {
  position: relative;
  padding: 14px 0 14px 20px;
  border-left: 2px solid var(--line);
}
.history-item:last-child { padding-bottom: 0; }
.history-item::before {
  content: "";
  position: absolute;
  left: -6px; top: 20px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--navy);
}
.history-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.history-item-head time { color: var(--muted); font-size: 12px; }
.history-item strong { display: block; margin: 2px 0 4px; }
.history-item p { margin: 0 0 4px; font-size: 13px; }
.history-item small { color: var(--muted); }
.form-grid .check-inline { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #4b5563; }
.form-grid .check-inline input[type="checkbox"] { width: 16px; height: 16px; }

@media (max-width: 1100px) {
  .stats-grid, .grid-2, .security-grid, .form-grid, .kanban, .chat-layout { grid-template-columns: 1fr; }
  .widget-main, .widget-aside, .widget-third, .widget-half, .widget-full { grid-column: span 12; }
  .chat-shell { grid-template-columns: 1fr; min-height: auto; }
}
@media (max-width: 800px) {
  .login-page {
    display: grid;
    place-items: center;
    align-content: start;
    min-height: 100dvh;
    padding: 24px 16px 32px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-size: cover;
    background-position: left center;
  }
  .login-panel {
    width: 100%;
    max-width: 420px;
    margin: 12px auto;
    padding: 28px 20px 18px;
  }
  .login-panel h1 { font-size: 32px; }
  .calc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    height: 100%;
    max-height: 100vh;
    z-index: 40;
    box-shadow: 8px 0 30px rgba(0,0,0,.12);
  }
  .sidebar.open { display: flex; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 35; }
  .menu-btn, .top-logo { display: inline-grid; }
  .content { padding: 16px 16px 24px; }
  .topbar { padding: 12px 16px; min-height: 64px; }
  .top-company { font-size: 18px; }
  .top-meta { display: none; }
  .top-user-copy { display: none; }
  .app-foot { padding: 12px 16px 24px; }
}
