:root {
  --bg: #eef1f4;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --surface-subtle: #fbfcfd;
  --ink: #20242a;
  --ink-strong: #111827;
  --muted: #65707d;
  --line: #dfe3e8;
  --line-soft: #edf0f3;
  --primary: #2563eb;
  --primary-dark: #1e4fd0;
  --primary-soft: #eaf1ff;
  --secondary: #45515f;
  --success: #2f7d32;
  --success-soft: #e6f4ea;
  --warning: #a16207;
  --warning-soft: #fff6db;
  --danger: #c2413c;
  --danger-soft: #fdecec;
  --pending: #c9cdd2;
  --pending-ink: #30353b;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 14px 36px rgba(17, 24, 39, 0.14);
  --radius: 6px;
  --radius-sm: 4px;
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 960px;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    linear-gradient(180deg, #f4f6f8 0, var(--bg) 260px),
    var(--bg);
  color: var(--ink);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

header {
  background: #27313d;
  color: #fff;
  padding: 18px 24px;
  text-align: center;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-bottom: 4px solid #4b8f3c;
  box-shadow: var(--shadow-sm);
}

.auth-loading,
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(39, 49, 61, 0.94), rgba(39, 49, 61, 0.82)),
    url("../img.png") center / cover no-repeat,
    #27313d;
}

.login-composition {
  width: min(920px, calc(100vw - 56px));
  min-height: 440px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 410px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.login-identity {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 440px;
  padding: 40px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(39, 49, 61, 0.94), rgba(39, 49, 61, 0.74)),
    url("../img.png") center / cover no-repeat,
    #27313d;
}

.login-identity span {
  margin-bottom: 12px;
  color: #b8c4d2;
  font-size: 13px;
  font-weight: 800;
}

.login-identity strong {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
}

.login-identity p {
  max-width: 420px;
  margin: 16px 0 0;
  color: #d8e0ea;
  font-size: 15px;
  line-height: 1.7;
}

.auth-loading-panel,
.login-panel {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.auth-loading-panel {
  padding: 24px;
  color: var(--ink-strong);
  font-weight: 800;
  text-align: center;
}

.login-panel {
  align-self: center;
  width: 100%;
  padding: 34px;
  border: 0;
  box-shadow: none;
}

.login-brand {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.login-brand span {
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.login-brand strong {
  color: var(--ink-strong);
  font-size: 24px;
  font-weight: 800;
}

.login-form,
.account-section {
  display: grid;
  gap: 14px;
}

.login-form label,
.account-section label,
.employee-modal .input-group {
  display: grid;
  gap: 6px;
}

.login-form label span,
.account-section label span,
.employee-modal .input-group span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-form input,
.account-section input,
.employee-modal input,
.employee-modal select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
}

.login-form input:focus,
.account-section input:focus,
.employee-modal input:focus,
.employee-modal select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.auth-error,
.auth-inline-message.is-error,
.manager-message.is-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.auth-inline-message.is-ok,
.manager-message.is-ok {
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.app-header h1 {
  margin: 0;
  font-size: 21px;
}

.account-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.account-strip strong {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: #e8f5e9;
  background: rgba(75, 143, 60, 0.28);
  border: 1px solid rgba(202, 232, 209, 0.2);
  border-radius: var(--radius-sm);
}

.account-strip .btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

.account-strip .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  background:
    linear-gradient(180deg, #f6f8fa 0, #eef1f4 280px),
    #eef1f4;
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  color: #fff;
  background: #202a35;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.side-brand {
  display: grid;
  gap: 5px;
  padding: 6px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.side-brand span {
  color: #62b052;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.side-brand strong {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.side-nav button {
  min-height: 48px;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  color: #c9d3df;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
}

.side-nav button:hover,
.side-nav button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.side-nav button span {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 900;
}

.side-nav button.active span {
  color: #fff;
  background: #2f7d32;
}

.side-nav button strong {
  font-size: 14px;
  font-weight: 800;
}

.side-account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.avatar-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #fff;
  background: #2f7d32;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 900;
}

.side-account strong,
.side-account span {
  display: block;
}

.side-account strong {
  color: #fff;
  font-size: 14px;
}

.side-account span {
  margin-top: 3px;
  color: #b8c4d2;
  font-size: 12px;
  font-weight: 700;
}

.workspace-shell {
  min-width: 0;
}

.workspace-topbar {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 14px;
  color: var(--ink-strong);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.workspace-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-topbar h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tab-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.tab-nav ul {
  max-width: 1560px;
  list-style: none;
  display: flex;
  margin: 0 auto;
  padding: 0 20px;
}

.tab-nav ul li {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  user-select: none;
}

.tab-nav ul li.active {
  color: var(--ink-strong);
  background: var(--surface-subtle);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.tab-nav ul li:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.tab-content {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 24px 28px;
}

.account-hub {
  display: grid;
  gap: 18px;
}

.account-preferences {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 0 30px;
}

.account-preferences-hero {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  padding: 30px;
  color: #111827;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 252, 0.78)),
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.16), transparent 36%),
    radial-gradient(circle at 84% 20%, rgba(47, 125, 50, 0.14), transparent 32%);
  border: 1px solid rgba(209, 216, 226, 0.72);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.11);
}

.account-preferences-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.account-orb {
  position: relative;
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background:
    linear-gradient(145deg, #34c759, #248a3d 58%, #1f6f35);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 18px 34px rgba(31, 111, 53, 0.26);
  font-size: 34px;
  font-weight: 900;
}

.account-identity,
.account-state-stack {
  position: relative;
}

.account-identity span {
  display: block;
  color: #7b8490;
  font-size: 13px;
  font-weight: 800;
}

.account-identity h2 {
  margin: 5px 0 6px;
  color: #0f172a;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: 0;
}

.account-identity p {
  margin: 0;
  color: #56616f;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.account-state-stack {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.account-state-stack span,
.account-state-stack strong {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.account-state-stack span {
  color: #334155;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(209, 216, 226, 0.86);
}

.account-state-stack strong {
  color: #17603b;
  background: rgba(230, 244, 234, 0.82);
  border: 1px solid rgba(176, 219, 186, 0.72);
}

.preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.preference-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 292px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(209, 216, 226, 0.76);
  border-radius: 22px;
  box-shadow: 0 16px 46px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(20px);
}

.preference-panel-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.preference-symbol {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #0a84ff;
  border-radius: 13px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.22);
}

.preference-panel:nth-child(2) .preference-symbol {
  background: #34c759;
  box-shadow: 0 10px 22px rgba(52, 199, 89, 0.2);
}

.preference-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  font-weight: 850;
}

.preference-panel p {
  margin: 5px 0 0;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.setting-list {
  overflow: hidden;
  display: grid;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(222, 227, 234, 0.9);
  border-radius: 16px;
}

.setting-list-account {
  margin-bottom: 2px;
}

.setting-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(229, 234, 240, 0.96);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.setting-row input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  color: #111827;
  background: rgba(248, 250, 252, 0.86);
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.setting-row input:hover {
  background: #fff;
  border-color: #dce3ec;
}

.setting-row input:focus {
  outline: none;
  background: #fff;
  border-color: #0a84ff;
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14);
}

.account-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(222, 227, 234, 0.88);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.7);
}

.account-guidance span,
.account-guidance strong {
  font-size: 12px;
  line-height: 1.45;
}

.account-guidance span {
  color: #64748b;
  font-weight: 850;
}

.account-guidance strong {
  color: #334155;
  font-weight: 750;
  text-align: right;
}

.security-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.security-check {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #64748b;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.7);
  font-size: 12px;
  font-weight: 850;
}

.security-check.is-ok {
  color: #17603b;
  background: rgba(232, 247, 237, 0.9);
  border-color: rgba(52, 199, 89, 0.22);
}

.preference-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.btn.btn-preference {
  width: auto;
  min-width: 128px;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #0a84ff;
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.2);
  font-size: 14px;
}

.btn.btn-preference:hover {
  background: #0071e3;
}

.btn.btn-preference[disabled] {
  background: #aeb7c2;
  box-shadow: none;
}

.employee-dashboard,
.employee-records {
  max-width: 1260px;
  margin: 0 auto;
  padding-bottom: 32px;
}

.employee-dashboard-hero,
.employee-records-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  min-height: 172px;
  padding: 28px;
  border: 1px solid rgba(209, 216, 226, 0.78);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.9)),
    linear-gradient(90deg, rgba(39, 49, 61, 0.08), rgba(75, 143, 60, 0.1));
  box-shadow: 0 18px 52px rgba(17, 24, 39, 0.08);
}

.employee-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--success);
  font-size: 12px;
  font-weight: 850;
}

.employee-dashboard-hero h2,
.employee-records-hero h2 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 32px;
  font-weight: 850;
  line-height: 1.15;
}

.employee-dashboard-hero p,
.employee-records-hero p {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.65;
}

.employee-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.readonly-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: #17603b;
  border: 1px solid rgba(52, 199, 89, 0.24);
  border-radius: 999px;
  background: rgba(232, 247, 237, 0.9);
  font-size: 12px;
  font-weight: 850;
}

.employee-alert {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 14px 16px;
  color: var(--danger);
  border: 1px solid rgba(255, 69, 58, 0.2);
  border-radius: 14px;
  background: var(--danger-soft);
}

.employee-alert strong {
  font-size: 14px;
}

.employee-alert span {
  font-size: 13px;
  line-height: 1.45;
}

.employee-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.employee-stat {
  min-height: 106px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(209, 216, 226, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.employee-stat span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.employee-stat strong {
  color: var(--ink-strong);
  font-size: 31px;
  font-weight: 900;
  line-height: 1;
}

.employee-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(340px, 0.72fr);
  gap: 16px;
  margin-top: 16px;
}

.employee-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(209, 216, 226, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(17, 24, 39, 0.06);
}

.employee-panel-wide {
  grid-row: span 2;
}

.employee-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.employee-panel-head h3 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 18px;
  font-weight: 850;
}

.employee-panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.employee-panel-head > span {
  flex-shrink: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.progress-stack {
  display: grid;
  gap: 14px;
}

.progress-row {
  display: grid;
  gap: 8px;
}

.progress-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-row-top strong,
.progress-row-top span {
  font-size: 13px;
  line-height: 1.4;
}

.progress-row-top strong {
  min-width: 0;
  color: #1f2937;
  font-weight: 850;
}

.progress-row-top span {
  flex-shrink: 0;
  color: #64748b;
  font-weight: 800;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #edf1f5;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #34c759);
}

.progress-note {
  color: #7b8490;
  font-size: 12px;
  font-weight: 700;
}

.employee-list {
  display: grid;
  gap: 10px;
}

.employee-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 62px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(229, 234, 240, 0.92);
}

.employee-list-row:last-child {
  border-bottom: 0;
}

.employee-list-row div {
  min-width: 0;
}

.employee-list-row strong,
.employee-list-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-list-row strong {
  color: #1f2937;
  font-size: 13px;
  font-weight: 850;
}

.employee-list-row span {
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.employee-list-row em {
  flex-shrink: 0;
  color: #475569;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
  text-align: right;
}

.employee-empty {
  min-height: 76px;
  display: grid;
  place-items: center;
  color: #7b8490;
  border: 1px dashed rgba(203, 213, 225, 0.8);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.72);
  font-size: 13px;
  font-weight: 750;
}

.employee-record-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.employee-record-filters,
.employee-record-results {
  margin-top: 16px;
}

.employee-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.employee-filter-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.employee-filter-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.employee-filter-grid input,
.employee-filter-grid select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink-strong);
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 12px;
  background: #fbfcfd;
  font-size: 14px;
  font-weight: 750;
}

.employee-filter-grid input:focus,
.employee-filter-grid select:focus {
  outline: none;
  border-color: rgba(0, 113, 227, 0.62);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.employee-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.employee-record-list {
  display: grid;
  gap: 12px;
}

.employee-record-card {
  padding: 15px;
  border: 1px solid rgba(219, 226, 235, 0.95);
  border-radius: 16px;
  background: #fff;
}

.employee-record-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.employee-record-main > div {
  min-width: 0;
}

.employee-record-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.employee-record-main strong,
.employee-record-main p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-record-main strong {
  display: block;
  color: var(--ink-strong);
  font-size: 17px;
  font-weight: 900;
}

.employee-record-main p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.employee-record-main em {
  flex-shrink: 0;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.employee-record-main em.is-current {
  color: #17603b;
  border: 1px solid rgba(52, 199, 89, 0.28);
  background: rgba(232, 247, 237, 0.92);
}

.employee-record-main em.is-history {
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(248, 250, 252, 0.96);
}

.employee-record-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.employee-record-info div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(229, 234, 240, 0.9);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.78);
}

.employee-record-info span,
.employee-record-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-record-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.employee-record-info strong {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 850;
}

.employee-record-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.employee-record-pager span {
  min-width: 72px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.back-top-button {
  position: fixed;
  right: 26px;
  bottom: 28px;
  z-index: 45;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  padding: 6px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(31, 41, 51, 0.9);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  cursor: pointer;
}

.back-top-button span {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.back-top-button strong {
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
}

.back-top-button:hover {
  background: #111827;
}

.drawing-manager {
  width: 100%;
  min-height: calc(100vh - 100px);
  user-select: none;
}

.drawing-manager:focus {
  outline: none;
}

.dashboard-title {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 0 18px;
  color: var(--ink-strong);
  font-size: 21px;
  font-weight: 800;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--success);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-bar {
  display: grid;
  gap: 12px;
  position: relative;
  z-index: 30;
  overflow: visible;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-toolbar,
.filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

.filter-toolbar {
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 220px;
}

.filter-title strong {
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 800;
}

.filter-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 142px;
}

.filter-field-small {
  width: 132px;
}

.autocomplete-field {
  position: relative;
  width: 100%;
}

.suggestions.autocomplete-suggestions {
  top: calc(100% + 5px);
  z-index: 10000;
}

.modal .autocomplete-field .autocomplete-suggestions {
  position: static;
  margin-top: 6px;
  max-height: 132px;
  box-shadow: var(--shadow-sm);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-bar label,
.modal .input-group label,
.four-cols span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.filter-bar input[type="text"],
.modal input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.filter-bar input[type="text"]:hover,
.modal input:hover {
  border-color: #c7d0db;
}

.filter-bar input[type="text"]:focus,
.modal input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--focus);
}

.filter-primary-action {
  margin-left: auto;
}

.btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.btn:hover {
  background: var(--primary-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  background: #c3cad2;
  color: #f8fafc;
  cursor: not-allowed;
  transform: none;
}

.btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  margin: 2px;
}

.btn-compact {
  min-height: 34px;
  padding: 0 12px;
}

.btn-secondary {
  color: var(--ink-strong);
  background: #eef2f6;
  border-color: #d4dae2;
}

.btn-secondary:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #bfd0f7;
}

.btn-secondary.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #9fbaf5;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.btn-ghost {
  color: var(--secondary);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--ink-strong);
  background: var(--surface-subtle);
  border-color: #cbd5df;
}

.btn-danger {
  color: #fff;
  background: var(--danger);
}

.btn-danger:hover {
  background: #a9322e;
}

.btn-danger-soft {
  color: #9f2723;
  background: var(--danger-soft);
  border-color: #f2c7c4;
}

.btn-danger-soft:hover {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.table-scroll {
  width: 100%;
  position: relative;
  z-index: 1;
  overflow-x: auto;
  border-radius: var(--radius);
}

table:not(.data-table) {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.data-table th,
.data-table td,
table:not(.data-table) th,
table:not(.data-table) td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  vertical-align: middle;
}

.data-table th:last-child,
.data-table td:last-child,
table:not(.data-table) th:last-child,
table:not(.data-table) td:last-child {
  border-right: 0;
}

.data-table tbody tr:last-child td,
table:not(.data-table) tbody tr:last-child td {
  border-bottom: 0;
}

.data-table thead,
.data-table thead tr,
table:not(.data-table) thead,
table:not(.data-table) thead tr {
  position: static;
}

.data-table thead th,
table:not(.data-table) thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 42px;
  background: #f3f5f7;
  color: #343b44;
  font-size: 13px;
  font-weight: 800;
  box-shadow: inset 0 -1px 0 var(--line);
}

.data-table tbody tr:nth-child(odd),
table:not(.data-table) tbody tr:nth-child(odd) {
  background: #fff;
}

.data-table tbody tr:nth-child(even),
table:not(.data-table) tbody tr:nth-child(even) {
  background: #fafbfc;
}

.data-table tbody tr:hover,
table:not(.data-table) tbody tr:hover {
  background: #eff6ff;
}

.drawing-table {
  table-layout: fixed;
}

.drawing-table th:nth-child(1),
.drawing-table td:nth-child(1) {
  width: 64px;
}

.drawing-table th:nth-child(2),
.drawing-table td:nth-child(2) {
  width: 240px;
}

.drawing-table th:nth-child(9),
.drawing-table td:nth-child(9) {
  width: 206px;
}

.drawing-table th:nth-child(10),
.drawing-table td:nth-child(10) {
  width: 160px;
}

.link-cell {
  color: var(--primary-dark);
  cursor: pointer;
  font-weight: 700;
  user-select: none;
}

.link-cell:hover {
  text-decoration: underline;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.status-ready {
  color: #17603b;
  background: var(--success-soft);
}

.status-processing {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-failed {
  color: #9f2723;
  background: var(--danger-soft);
}

.status-empty {
  color: var(--secondary);
  background: #e8edf2;
}

.file-error {
  max-width: 220px;
  margin: 6px auto 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.file-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.file-hint.is-error {
  color: var(--danger);
}

.dwg-analysis-summary {
  padding: 8px 10px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  background: var(--surface-subtle);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.muted-cell {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dwg-qr-count {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dwg-actions,
.row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  white-space: nowrap;
}

.dwg-actions {
  width: 100%;
  max-width: 168px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  margin: 0 auto;
  white-space: normal;
}

.dwg-actions .btn {
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
}

.dwg-actions .btn:nth-child(3) {
  grid-column: 1 / -1;
}

.dwg-actions .btn,
.row-actions .btn {
  margin: 0;
}

.btn.btn-dwg-download:disabled {
  color: #7b8490;
  background: #eef2f6;
  border-color: #d8dee6;
}

.btn.btn-dwg-download {
  color: #fff;
  background: #0a84ff;
  border-color: #0a84ff;
  box-shadow: 0 8px 18px rgba(10, 132, 255, 0.16);
}

.btn.btn-dwg-download:hover {
  color: #fff;
  background: #0071e3;
  border-color: #0071e3;
}

.btn.btn-dwg-preview {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.14);
}

.btn.btn-dwg-preview:hover {
  color: #fff;
  background: #0d9488;
  border-color: #0d9488;
}

.btn.btn-dwg-generate {
  color: #334155;
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: none;
}

.btn.btn-dwg-generate:hover {
  color: #0f172a;
  background: #eef2f7;
  border-color: #b6c2cf;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(2px);
}

.modal {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  padding: 22px;
  border: 1px solid rgba(223, 227, 232, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  animation: slideIn 0.18s ease-out;
}

.modal.full-screen {
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--surface);
  overflow: hidden;
}

.modal-icon-close {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.modal-icon-close::before,
.modal-icon-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.modal-icon-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-icon-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-icon-close:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f2c7c4;
}

.modal h3 {
  margin: 0 0 18px;
  color: var(--ink-strong);
  font-size: 18px;
  line-height: 1.25;
}

.modal .input-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal input[type="file"] {
  height: auto;
  padding: 8px;
  background: var(--surface-subtle);
}

.dwg-wait-panel {
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line-soft);
}

.dwg-wait-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dwg-wait-head strong {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.35;
}

.dwg-wait-head span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dwg-step-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.dwg-step {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.dwg-step-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  background: var(--pending);
  border-radius: 50%;
}

.dwg-step.done {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cfe8d6;
}

.dwg-step.done .dwg-step-dot {
  background: var(--success);
}

.dwg-step.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #c8d8fb;
}

.dwg-step.active .dwg-step-dot {
  background: var(--primary);
}

.dwg-step.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #f2c7c4;
}

.dwg-step.error .dwg-step-dot {
  background: var(--danger);
}

.dwg-wait-work {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.dwg-task-chip {
  padding: 4px 7px;
  color: var(--pending-ink);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.dwg-task-chip.done {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cfe8d6;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.modal-buttons button {
  margin: 0;
}

.four-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.four-cols > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.four-cols input {
  width: 100%;
}

.designer-input-wrap {
  position: relative;
  width: 100%;
}

.designer-input {
  width: 100%;
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid #bfd0f7;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  z-index: 9999;
}

.suggestions li {
  padding: 8px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color 0.16s ease, color 0.16s ease;
}

.suggestions li:hover {
  color: var(--primary-dark);
  background-color: var(--primary-soft);
}

.detail-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dwg-preview-modal {
  background: #e7ebf0;
}

.dwg-preview-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dwg-preview-header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dwg-preview-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 18px;
  background: #dfe4ec;
}

.dwg-preview-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.dwg-preview-image.is-loading {
  opacity: 0.32;
}

.dwg-preview-state {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.dwg-preview-state.is-error {
  color: var(--danger);
}

.detail-header {
  position: relative;
  flex: 0 0 auto;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.detail-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-header-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  line-height: 1.5;
}

.detail-header-content strong {
  font-size: 15px;
  color: var(--ink-strong);
}

.detail-header-actions {
  gap: 14px;
}

.detail-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #f2f4f6;
}

.detail-content table {
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.detail-content thead,
.detail-content thead tr {
  position: static;
}

.detail-content thead th {
  position: sticky;
  top: 0;
  z-index: 7;
  height: 50px;
  background: #f4f6f8;
  font-size: 14px;
}

.detail-table {
  table-layout: fixed;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.detail-table th,
.detail-table td {
  height: 40px;
  padding: 8px 10px;
  font-size: 15px;
}

.detail-table th:nth-child(1),
.detail-table td:nth-child(1) {
  width: 72px;
}

.detail-table th:nth-child(2),
.detail-table td:nth-child(2) {
  width: 260px;
}

.process-cell {
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.process-cell-label,
.process-cell-history {
  display: block;
  line-height: 1.2;
}

.process-cell-history {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  opacity: 0.82;
}

.process-cell.is-done {
  background: var(--success);
  color: #fff;
}

.process-cell.is-pending {
  background: var(--pending);
  color: var(--pending-ink);
}

.process-cell:hover {
  filter: brightness(0.96);
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.24);
}

.tooltip {
  position: fixed;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  max-width: min(340px, calc(100vw - 16px));
  overflow-wrap: break-word;
  pointer-events: none;
  z-index: 3000;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.22);
}

.process-record-overlay {
  z-index: 2600;
}

.process-record-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 36px));
}

.process-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.process-record-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 850;
}

.process-record-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  word-break: break-all;
}

.process-record-head p {
  margin: 6px 0 0;
  color: var(--secondary);
  font-weight: 750;
}

.process-record-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid #d8dee6;
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.process-record-current.is-done {
  border-color: rgba(47, 125, 50, 0.28);
  background: #edf7ef;
}

.process-record-current.is-pending {
  border-color: rgba(161, 98, 7, 0.24);
  background: #fff8e6;
}

.process-record-current span {
  color: var(--secondary);
  font-size: 13px;
  text-align: right;
}

.process-record-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.process-record-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--secondary);
  font-size: 13px;
  font-weight: 800;
}

.process-record-form select,
.process-record-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd7e1;
  border-radius: var(--radius-sm);
  background: #fbfcfd;
  color: var(--text);
  padding: 8px 10px;
  font-size: 14px;
}

.process-record-note {
  grid-column: 1 / -1;
}

.process-record-message {
  margin-top: 12px;
  color: #1f6b2a;
  font-size: 13px;
  font-weight: 800;
}

.process-record-message.is-error {
  color: var(--danger);
}

.process-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.process-record-history {
  margin-top: 20px;
  border-top: 1px solid #e1e6ee;
  padding-top: 16px;
}

.process-record-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.process-record-section-title span,
.process-record-empty {
  color: var(--secondary);
  font-size: 13px;
  font-weight: 750;
}

.process-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-history-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #e0e6ee;
  border-radius: var(--radius-sm);
  background: #fbfcfd;
}

.process-history-main {
  min-width: 0;
}

.process-history-main strong,
.process-history-main span {
  display: block;
}

.process-history-main strong {
  margin-bottom: 4px;
  color: var(--text);
}

.process-history-main span {
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.45;
}

.process-history-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.process-manager,
.employee-manager {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.process-manager h2,
.employee-manager h2 {
  margin: 0 0 14px;
  color: var(--ink-strong);
  font-size: 18px;
}

.process-manager > .btn,
.employee-manager > .btn {
  margin-bottom: 12px;
}

.manager-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.manager-toolbar h2 {
  margin: 0;
}

.manager-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.employee-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.employee-stat-row > div {
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.employee-stat-row span,
.employee-stat-row strong {
  display: block;
}

.employee-stat-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.employee-stat-row strong {
  margin-top: 5px;
  color: var(--ink-strong);
  font-size: 24px;
  font-weight: 900;
}

.credential-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--success-soft);
  border: 1px solid #cfe8d6;
  border-radius: var(--radius);
}

.credential-notice div {
  display: grid;
  gap: 3px;
}

.credential-notice strong {
  color: #17603b;
  font-size: 14px;
}

.credential-notice span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.credential-notice code,
.inline-code {
  padding: 3px 6px;
  color: var(--ink-strong);
  background: #edf1f5;
  border: 1px solid #d7dde5;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.manager-message {
  margin-bottom: 10px;
}

.employee-table {
  table-layout: fixed;
}

.employee-table th:nth-child(1),
.employee-table td:nth-child(1) {
  width: 56px;
}

.employee-table th:nth-child(5),
.employee-table td:nth-child(5) {
  width: 88px;
}

.employee-table th:nth-child(9),
.employee-table td:nth-child(9) {
  width: 310px;
}

.time-cell {
  white-space: pre-line;
  color: var(--muted);
  font-size: 12px;
}

.employee-name-cell {
  text-align: left !important;
}

.employee-name-cell span,
.employee-name-cell small {
  display: block;
}

.employee-name-cell span {
  color: var(--ink-strong);
  font-weight: 900;
}

.employee-name-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.employee-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

.employee-actions .btn {
  margin: 0;
}

.employee-actions .btn-danger {
  width: auto;
}

.employee-modal {
  max-width: 420px;
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .tab-content {
    padding: 14px;
  }

  .employee-dashboard-hero,
  .employee-records-hero,
  .employee-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .employee-dashboard-hero,
  .employee-records-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-stat-grid,
  .employee-record-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-filter-grid,
  .employee-record-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-panel-wide {
    grid-row: auto;
  }

  .account-preferences {
    max-width: none;
  }

  .account-preferences-hero,
  .preference-grid {
    grid-template-columns: 1fr;
  }

  .account-state-stack {
    justify-items: start;
  }

  .filter-primary-action {
    margin-left: 0;
  }

  .filter-field,
  .filter-field-small {
    width: calc(50% - 6px);
  }

  .filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-title {
    min-width: 0;
    flex-wrap: wrap;
  }

  .filter-primary-action,
  .filter-buttons {
    width: 100%;
  }

  .filter-buttons .btn,
  .filter-primary-action {
    flex: 1;
  }

  .drawing-table {
    min-width: 1040px;
  }

  .detail-table {
    min-width: 1260px;
  }
}

@media (max-width: 720px) {
  .process-record-form {
    grid-template-columns: 1fr;
  }

  .process-record-current,
  .process-history-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-record-current span {
    text-align: left;
  }
}

@media (max-width: 700px) {
  body {
    min-width: 0;
  }

  .employee-dashboard-hero,
  .employee-records-hero {
    padding: 22px;
    border-radius: 18px;
  }

  .employee-dashboard-actions {
    width: 100%;
    justify-content: space-between;
  }

  .employee-stat-grid,
  .employee-record-summary,
  .employee-filter-grid,
  .employee-record-info {
    grid-template-columns: 1fr;
  }

  .employee-list-row,
  .employee-record-main,
  .employee-filter-actions,
  .employee-record-pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .employee-list-row em {
    text-align: left;
  }

  .employee-record-main strong,
  .employee-record-main p,
  .employee-record-info span,
  .employee-record-info strong {
    white-space: normal;
  }

  .employee-filter-actions .btn,
  .employee-record-pager .btn {
    width: 100%;
  }

  .back-top-button {
    right: 14px;
    bottom: 14px;
  }

  header {
    padding: 16px 12px;
    font-size: 18px;
  }

  .tab-nav ul {
    padding: 0;
  }

  .tab-nav ul li {
    min-height: 48px;
    padding: 0 6px;
    font-size: 13px;
  }

  .tab-content {
    padding: 14px;
  }

  .account-preferences-hero {
    padding: 22px;
    border-radius: 18px;
  }

  .account-orb {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    font-size: 28px;
  }

  .preference-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .setting-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dashboard-title {
    min-height: auto;
    padding: 12px;
    font-size: 17px;
    line-height: 1.35;
    text-align: center;
  }

  .filter-field,
  .filter-field-small {
    width: 100%;
  }
}

/* Apple-inspired production polish layer */
:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-subtle: rgba(248, 250, 252, 0.9);
  --ink: #1d1d1f;
  --ink-strong: #0f172a;
  --muted: #6e7784;
  --line: rgba(210, 216, 225, 0.82);
  --line-soft: rgba(229, 234, 240, 0.86);
  --primary: #0a84ff;
  --primary-dark: #0071e3;
  --primary-soft: #e8f2ff;
  --secondary: #56616f;
  --success: #34c759;
  --success-soft: #e8f7ed;
  --warning: #b7791f;
  --warning-soft: #fff7df;
  --danger: #ff453a;
  --danger-soft: #fff0ef;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 34px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --focus: 0 0 0 4px rgba(10, 132, 255, 0.16);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(180deg, #fbfbfd 0, #f5f5f7 320px),
    #f5f5f7;
  color: var(--ink);
}

.app-shell {
  background:
    linear-gradient(180deg, #fbfbfd 0, #f5f5f7 280px),
    #f5f5f7;
}

.side-rail {
  padding: 24px 16px;
  background: #1f2933;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.side-brand {
  padding: 6px 8px 20px;
}

.side-brand span {
  color: #75d66b;
}

.side-brand strong {
  font-weight: 850;
}

.side-nav {
  gap: 9px;
}

.side-nav button {
  min-height: 50px;
  border-radius: 14px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.16s ease;
}

.side-nav button:hover {
  transform: translateX(2px);
}

.side-nav button.active {
  background: rgba(255, 255, 255, 0.11);
}

.side-nav button span,
.avatar-mark {
  border-radius: 12px;
}

.side-account {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.workspace-topbar {
  min-height: 108px;
  padding: 26px 32px 18px;
}

.workspace-kicker {
  color: #7b8490;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.workspace-topbar h1 {
  font-size: 31px;
  font-weight: 850;
  line-height: 1.15;
}

.tab-content {
  padding: 0 32px 44px;
}

.status-badge {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  pointer-events: auto;
  z-index: auto;
}

.status-ready {
  color: #17603b;
  background: rgba(232, 247, 237, 0.9);
  border-color: rgba(52, 199, 89, 0.22);
}

.status-processing {
  color: #7a4a00;
  background: rgba(255, 247, 223, 0.94);
  border-color: rgba(183, 121, 31, 0.18);
}

.status-empty {
  color: #64748b;
  background: rgba(241, 245, 249, 0.94);
  border-color: rgba(203, 213, 225, 0.62);
}

.btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.16);
  font-weight: 750;
}

.btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 28px rgba(10, 132, 255, 0.2);
}

.btn-small {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.btn-secondary {
  color: #273444;
  background: rgba(241, 245, 249, 0.92);
  border-color: rgba(210, 216, 225, 0.82);
  box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: rgba(10, 132, 255, 0.22);
  box-shadow: none;
}

.btn-ghost {
  color: #56616f;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(210, 216, 225, 0.8);
  box-shadow: none;
}

.btn-ghost:hover {
  color: #111827;
  background: #fff;
  box-shadow: none;
}

.btn-danger,
.btn-danger-soft:hover {
  background: var(--danger);
  box-shadow: 0 10px 22px rgba(255, 69, 58, 0.16);
}

.btn-danger-soft {
  color: #b42318;
  background: var(--danger-soft);
  border-color: rgba(255, 69, 58, 0.18);
  box-shadow: none;
}

.dashboard-title {
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 22px 24px;
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(246, 249, 252, 0.82));
  border: 1px solid rgba(210, 216, 225, 0.78);
  border-left: 0;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.dashboard-title strong {
  color: #0f172a;
  font-size: 23px;
  font-weight: 850;
}

.dashboard-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar,
.manager-surface,
.modal,
.detail-header,
.dwg-preview-header {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(210, 216, 225, 0.78);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.filter-bar {
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px;
}

.filter-toolbar {
  padding-bottom: 14px;
  border-bottom-color: var(--line-soft);
}

.filter-title {
  gap: 12px;
}

.filter-title strong,
.manager-toolbar h2 {
  font-size: 20px;
  font-weight: 850;
}

.filter-title span,
.manager-toolbar p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.filter-fields {
  gap: 12px;
}

.filter-field {
  gap: 7px;
}

.filter-bar label,
.modal .input-group label,
.four-cols span,
.login-form label span,
.account-section label span,
.employee-modal .input-group span {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.filter-bar input[type="text"],
.modal input,
.modal select,
.login-form input,
.account-section input,
.employee-modal input,
.employee-modal select {
  min-height: 40px;
  border-color: rgba(210, 216, 225, 0.78);
  border-radius: 13px;
  background: rgba(248, 250, 252, 0.92);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.filter-bar input[type="text"]:hover,
.modal input:hover,
.modal select:hover,
.login-form input:hover,
.account-section input:hover,
.employee-modal input:hover,
.employee-modal select:hover {
  background: #fff;
}

.table-scroll {
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.data-table,
table:not(.data-table) {
  border-color: rgba(210, 216, 225, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

.data-table th,
.data-table td,
table:not(.data-table) th,
table:not(.data-table) td {
  padding: 12px 13px;
  border-color: var(--line-soft);
  font-size: 13px;
}

.data-table thead th,
table:not(.data-table) thead th {
  min-height: 44px;
  color: #475569;
  background: rgba(248, 250, 252, 0.96);
  font-size: 12px;
  letter-spacing: 0;
}

.data-table tbody tr:nth-child(odd),
.data-table tbody tr:nth-child(even),
table:not(.data-table) tbody tr:nth-child(odd),
table:not(.data-table) tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.92);
}

.data-table tbody tr:hover,
table:not(.data-table) tbody tr:hover {
  background: rgba(232, 242, 255, 0.58);
}

.link-cell {
  color: var(--primary-dark);
  font-weight: 750;
}

.muted-cell {
  color: #94a3b8;
  font-weight: 750;
}

.manager-surface {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.manager-toolbar {
  margin-bottom: 0;
}

.employee-stat-row {
  gap: 12px;
  margin-bottom: 0;
}

.employee-stat-row > div {
  padding: 16px;
  background: rgba(248, 250, 252, 0.86);
  border-color: rgba(210, 216, 225, 0.76);
  border-radius: 18px;
}

.employee-stat-row span {
  color: #7b8490;
  font-size: 12px;
}

.employee-stat-row strong {
  color: #111827;
  font-size: 25px;
  font-weight: 850;
}

.credential-notice,
.manager-message {
  border-radius: 16px;
}

.credential-notice {
  margin-bottom: 0;
  padding: 14px 16px;
  background: rgba(232, 247, 237, 0.9);
}

.inline-code,
.credential-notice code {
  border-color: rgba(203, 213, 225, 0.74);
  border-radius: 10px;
  background: rgba(241, 245, 249, 0.86);
}

.sequence-badge {
  min-width: 34px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 850;
}

.strong-cell {
  color: #0f172a;
  font-weight: 850;
  text-align: left !important;
}

.row-actions,
.employee-actions,
.dwg-actions {
  gap: 6px;
}

.modal-overlay {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.modal {
  padding: 24px;
  border-radius: 24px;
}

.modal h3 {
  margin-bottom: 18px;
  font-size: 21px;
  font-weight: 850;
}

.modal .input-group {
  gap: 7px;
  margin-bottom: 14px;
}

.modal-buttons {
  gap: 10px;
  margin-top: 18px;
}

.detail-container,
.dwg-preview-modal {
  background: #f5f5f7;
}

.detail-header,
.dwg-preview-header {
  border-radius: 0 0 22px 22px;
}

.detail-content {
  padding: 18px;
}

.process-cell {
  border-radius: 12px;
}

.account-preferences {
  max-width: 1120px;
}

@media (max-width: 1100px) {
  .workspace-topbar,
  .tab-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dashboard-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
