:root {
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --text: #15171c;
  --muted: #69707d;
  --line: rgba(26, 31, 42, 0.12);
  --accent: #0a84ff;
  --accent-dark: #0065d0;
  --danger: #d92d20;
  --success: #0f8a5f;
  --shadow: 0 24px 70px rgba(36, 45, 65, 0.14);
  --radius: 8px;
  --content-wide: 1560px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Microsoft YaHei",
    sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(10, 132, 255, 0.16), transparent 34%),
    radial-gradient(circle at 84% 8%, rgba(52, 199, 89, 0.14), transparent 30%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 62%, #eef2f8 100%);
  letter-spacing: 0;
}

.app-page {
  background-attachment: fixed;
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="date"],
input[type="month"] {
  min-height: 44px;
  min-width: 0;
  padding-right: 12px;
  border-color: rgba(26, 31, 42, 0.1);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 253, 0.94)),
    rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 22px rgba(36, 45, 65, 0.06);
  color-scheme: light;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 6px;
  border-radius: 999px;
  background-color: rgba(10, 132, 255, 0.1);
  cursor: pointer;
}

button {
  border: 0;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  min-height: 38px;
  padding: 0 16px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(18, 25, 38, 0.14);
}

button:active {
  transform: translateY(0) scale(0.99);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.danger-button {
  background: rgba(217, 45, 32, 0.1);
  color: var(--danger);
}

.secondary-button {
  background: #e9edf4;
  color: var(--text);
}

#new-project-button {
  min-width: 132px;
  background: #111318;
  color: #fff;
  box-shadow: 0 14px 30px rgba(18, 25, 38, 0.14);
}

.icon-text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ghost-button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.icon-button {
  width: 38px;
  min-width: 38px;
  padding: 0;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  border: 1px solid var(--line);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
  padding: 10px 12px;
  min-height: 38px;
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(10, 132, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: #303642;
  font-size: 13px;
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 430px);
}

.site-footer {
  margin-top: 46px;
  color: rgba(105, 112, 125, 0.58);
  font-size: 12px;
  text-align: center;
}

.app-footer {
  max-width: var(--content-wide);
  margin: 26px auto 0;
}

.login-panel {
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.74);
  box-shadow:
    0 32px 90px rgba(45, 58, 82, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(26px) saturate(1.08);
}

.brand-mark {
  --mark-hue: 0deg;
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.95), transparent 23%),
    radial-gradient(circle at 52% 58%, rgba(192, 224, 252, 0.5), transparent 56%),
    rgba(233, 243, 255, 0.7);
  box-shadow:
    0 24px 62px rgba(98, 130, 186, 0.22),
    0 0 48px rgba(143, 193, 234, 0.16),
    inset 0 1px 10px rgba(255, 255, 255, 0.72);
  filter: hue-rotate(var(--mark-hue)) saturate(1.13);
  isolation: isolate;
  transform: translateZ(0);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.brand-mark::before {
  z-index: 1;
  inset: -16px;
  background:
    radial-gradient(circle at 48% 48%, rgba(255, 255, 255, 0.42), transparent 38%),
    radial-gradient(circle at 50% 50%, rgba(118, 185, 239, 0.2), transparent 54%);
  filter: blur(14px);
  opacity: 0.82;
}

.brand-mark::after {
  z-index: 6;
  inset: -8px;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.38), transparent 26%),
    radial-gradient(circle at 50% 58%, rgba(250, 253, 255, 0.2), transparent 42%),
    rgba(246, 250, 255, 0.08);
  border-radius: inherit;
  backdrop-filter: blur(15px) saturate(1.16);
  -webkit-backdrop-filter: blur(15px) saturate(1.16);
  box-shadow:
    inset 0 0 28px rgba(255, 255, 255, 0.62),
    inset 0 -16px 34px rgba(112, 172, 228, 0.08);
}

.soul-blob {
  --s: 78px;
  --x0: 0px;
  --y0: 0px;
  --x1: 8px;
  --y1: -7px;
  --x2: -6px;
  --y2: 6px;
  --x3: -6px;
  --y3: 3px;
  --scale0: 1;
  --scale1: 1.14;
  --scale2: 0.94;
  --spin: 160deg;
  --spin1: 67deg;
  --spin2: -106deg;
  --spin3: 118deg;
  --dur: 11s;
  --delay: -2s;
  --soft: 18px;
  --alpha: 0.62;
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: var(--s);
  height: var(--s);
  opacity: var(--alpha);
  pointer-events: none;
  filter: blur(var(--soft));
  mix-blend-mode: multiply;
  transform: translate3d(calc(-50% + var(--x0)), calc(-50% + var(--y0)), 0) scale(var(--scale0));
  animation: soulDrift var(--dur) cubic-bezier(0.45, 0.02, 0.22, 1) infinite;
  animation-delay: var(--delay);
}

.soul-blob-a {
  clip-path: path("M61 9C80 15 87 38 74 55C61 73 35 82 17 66C-1 50 8 22 28 10C39 4 49 5 61 9Z");
  background:
    radial-gradient(circle at 30% 30%, rgba(117, 207, 255, 0.95), transparent 38%),
    linear-gradient(130deg, rgba(60, 145, 238, 0.92), rgba(149, 213, 238, 0.14));
}

.soul-blob-b {
  z-index: 2;
  clip-path: path("M43 5C62 3 78 17 80 36C83 58 65 77 42 76C18 75 5 58 12 35C17 18 27 8 43 5Z");
  background:
    radial-gradient(circle at 58% 44%, rgba(177, 154, 245, 0.9), transparent 38%),
    linear-gradient(210deg, rgba(142, 105, 231, 0.72), rgba(208, 228, 255, 0.16));
  mix-blend-mode: screen;
}

.soul-blob-c {
  z-index: 4;
  clip-path: path("M50 8C70 10 83 27 77 47C70 69 45 79 25 67C6 56 5 31 22 16C31 8 39 6 50 8Z");
  background:
    radial-gradient(circle at 48% 58%, rgba(93, 218, 192, 0.82), transparent 36%),
    linear-gradient(40deg, rgba(63, 181, 222, 0.58), rgba(255, 255, 255, 0.08));
}

.soul-blob-d {
  z-index: 3;
  clip-path: path("M35 8C54 1 75 11 80 30C86 51 70 70 49 75C27 80 8 65 9 43C10 25 20 14 35 8Z");
  background:
    radial-gradient(circle at 55% 48%, rgba(255, 166, 197, 0.58), transparent 35%),
    linear-gradient(145deg, rgba(122, 179, 245, 0.54), rgba(255, 255, 255, 0.1));
  mix-blend-mode: screen;
}

.soul-blob-e {
  z-index: 5;
  clip-path: path("M51 9C65 11 74 22 75 37C76 57 60 73 40 72C21 72 8 58 11 39C13 24 26 7 51 9Z");
  background:
    radial-gradient(circle at 45% 34%, rgba(255, 255, 255, 0.9), transparent 25%),
    radial-gradient(circle at 52% 66%, rgba(133, 201, 255, 0.4), transparent 44%);
  mix-blend-mode: screen;
  opacity: var(--alpha-soft);
}

.login-panel h1 {
  margin-top: 8px;
  margin-bottom: 28px;
}

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

.login-remember {
  justify-content: start;
  color: var(--muted);
  font-weight: 600;
}

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.app-page {
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: var(--content-wide);
  margin: 4px auto 26px;
  padding: 0 2px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.home-tab-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: min(44vw, 360px);
  padding: 4px;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.home-tab-control button {
  position: relative;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.home-tab-control button:hover {
  transform: none;
  box-shadow: none;
}

.home-tab-control button.active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(36, 45, 65, 0.12);
}

body.project-mode .home-tab-control {
  display: none;
}

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

.project-select {
  width: min(46vw, 430px);
}

.hidden {
  display: none !important;
}

.dashboard-view {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  overflow: visible;
}

.home-track {
  display: flex;
  width: 200vw;
  transition: transform 0.64s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}

.home-page {
  flex: 0 0 100vw;
  min-width: 0;
  padding: 24px max(58px, calc((100vw - var(--content-wide)) / 2 + 58px)) 104px;
  opacity: 1;
  transform: translateX(0) scale(1);
  transition:
    opacity 0.5s ease,
    transform 0.64s cubic-bezier(0.19, 1, 0.22, 1);
}

.home-track[data-active="tasks"] .attendance-home-page {
  opacity: 0;
  transform: translateX(-90px) scale(0.982);
}

.home-track[data-active="attendance"] .task-home-page {
  opacity: 0;
  transform: translateX(90px) scale(0.982);
}

.home-page-inner {
  width: 100%;
  max-width: var(--content-wide);
  margin: 0 auto;
  overflow: visible;
}

.attendance-home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.task-home-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.72fr) minmax(520px, 1.28fr);
  gap: 22px;
  align-items: start;
}

.task-create-card {
  grid-row: span 2;
}

.home-card {
  border-radius: 24px;
  box-shadow: 0 28px 82px rgba(36, 45, 65, 0.13);
  transform: translateZ(0);
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.home-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 34px 92px rgba(36, 45, 65, 0.14);
}

.dashboard-panel {
  min-height: 420px;
  padding: 30px;
}

.task-workbench-panel {
  min-height: 440px;
  padding: 28px;
  border-radius: 22px;
}

.task-workbench-grid {
  display: grid;
  grid-template-columns: minmax(310px, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
  align-items: start;
}

.task-form {
  min-width: 0;
}

.task-form {
  display: grid;
  gap: 14px;
}

.task-create-card,
.task-board {
  min-height: 0;
  padding: 30px;
}

.task-create-card {
  min-height: 560px;
}

.task-active-card,
.task-closed-card {
  min-height: 268px;
}

.task-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.task-urgent-line {
  min-height: 38px;
  align-content: center;
}

.task-dropzone {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 22px;
  border: 1px dashed rgba(10, 132, 255, 0.42);
  border-radius: 16px;
  background: rgba(245, 249, 255, 0.72);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.task-dropzone.has-files {
  place-items: stretch;
  align-content: start;
  min-height: 132px;
  background: rgba(255, 255, 255, 0.68);
}

.task-dropzone strong {
  color: var(--text);
  font-size: 16px;
}

.task-dropzone-prompt {
  display: grid;
  gap: 6px;
  place-items: center;
}

.task-dropzone.has-files .task-dropzone-prompt {
  display: none;
}

.task-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(10, 132, 255, 0.1);
  transform: translateY(-1px);
}

.task-file-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  min-height: 36px;
  align-content: start;
}

.task-file-list.empty-state {
  display: none;
}

.task-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
}

.task-file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-file-chip button {
  width: 22px;
  min-width: 22px;
  min-height: 22px;
  padding: 0;
  background: rgba(217, 45, 32, 0.1);
  color: var(--danger);
  box-shadow: none;
}

.task-list {
  display: grid;
  gap: 12px;
  max-height: min(66vh, 720px);
  overflow: auto;
}

.task-ticket {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(26, 31, 42, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 36px rgba(36, 45, 65, 0.07);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.task-ticket:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 132, 255, 0.18);
  box-shadow: 0 18px 42px rgba(36, 45, 65, 0.1);
}

.task-ticket.urgent {
  border-color: rgba(217, 45, 32, 0.28);
}

.task-ticket.archived {
  opacity: 0.72;
}

.task-content-text {
  color: #2b3038;
  line-height: 1.6;
  white-space: pre-wrap;
}

.task-date-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.task-date-strip span,
.task-date-strip strong {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(245, 247, 251, 0.92);
  font-weight: 700;
}

.task-date-strip strong {
  color: var(--accent-dark);
}

.task-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.task-timeline span {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.task-timeline i {
  display: block;
  height: 5px;
  border-radius: 999px;
  background: rgba(21, 23, 28, 0.1);
}

.task-timeline .done i,
.task-timeline .active i {
  background: linear-gradient(90deg, #0a84ff, #34c759);
}

.task-timeline .active {
  color: var(--text);
}

.task-attachments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-attachment {
  max-width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px));
  gap: 10px;
  margin-bottom: 18px;
}

.summary-pill {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

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

.summary-pill strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.dashboard-archive-card {
  display: grid;
  gap: 12px;
  min-height: 240px;
  align-content: start;
  padding: 30px;
}

.dashboard-archive-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.archive-chip-row {
  display: block;
}

.archive-chip {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 11px 13px;
  border: 1px solid rgba(26, 31, 42, 0.08);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.archive-chip span {
  overflow: hidden;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-chip small {
  color: var(--muted);
  font-size: 12px;
}

.archive-expand-button {
  justify-self: start;
}

.progress-card {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 166px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.66)),
    rgba(255, 255, 255, 0.74);
  color: var(--text);
  text-align: left;
  box-shadow: 0 18px 44px rgba(36, 45, 65, 0.08);
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.18s ease,
    box-shadow 0.18s ease;
  will-change: transform;
}

.progress-card:hover {
  transform: translateY(-3px) scale(1.003);
  border-color: rgba(10, 132, 255, 0.24);
  box-shadow: 0 26px 64px rgba(36, 45, 65, 0.13);
}

.progress-card::after {
  content: "";
  position: absolute;
  inset: auto -24px -42px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.13), transparent 68%);
  pointer-events: none;
}

.progress-card-head,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.progress-card-head span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
  line-height: 1.35;
  flex-wrap: wrap;
}

.progress-card-head strong {
  color: var(--accent-dark);
  font-size: 24px;
  white-space: nowrap;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(21, 23, 28, 0.1);
}

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

.progress-meta {
  color: var(--muted);
  font-size: 12px;
  align-items: flex-start;
  flex-direction: column;
}

.progress-meta b {
  color: var(--text);
  font-weight: 800;
}

.shortfall-tag {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border: 1px solid rgba(217, 45, 32, 0.58);
  border-radius: 4px;
  background: transparent;
  color: var(--danger);
  font-size: 11px;
  font-style: normal;
  font-weight: 400;
  white-space: nowrap;
}

.project-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shortfall-detail {
  margin-top: 8px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-line,
.skeleton-track {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(220, 226, 236, 0.78);
}

.skeleton-line {
  width: 100%;
  height: 13px;
}

.skeleton-line.title {
  width: 62%;
  height: 18px;
  border-radius: 6px;
}

.skeleton-line.short {
  width: 44%;
}

.skeleton-track {
  height: 10px;
}

.skeleton-line::after,
.skeleton-track::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: skeletonSweep 1.2s ease-in-out infinite;
}

@keyframes skeletonSweep {
  to {
    transform: translateX(100%);
  }
}

@keyframes soulDrift {
  0% {
    border-radius: 44% 56% 61% 39% / 50% 43% 57% 50%;
    transform: translate3d(calc(-50% + var(--x0)), calc(-50% + var(--y0)), 0) rotate(0deg) scale(var(--scale0));
  }
  24% {
    border-radius: 60% 40% 46% 54% / 44% 60% 40% 56%;
    transform: translate3d(calc(-50% + var(--x1)), calc(-50% + var(--y1)), 0) rotate(var(--spin1)) scale(var(--scale1));
  }
  58% {
    border-radius: 42% 58% 54% 46% / 59% 44% 56% 41%;
    transform: translate3d(calc(-50% + var(--x2)), calc(-50% + var(--y2)), 0) rotate(var(--spin2)) scale(var(--scale2));
  }
  82% {
    border-radius: 55% 45% 40% 60% / 47% 41% 59% 53%;
    transform: translate3d(calc(-50% + var(--x3)), calc(-50% + var(--y3)), 0) rotate(var(--spin3)) scale(var(--scale1));
  }
  100% {
    border-radius: 44% 56% 61% 39% / 50% 43% 57% 50%;
    transform: translate3d(calc(-50% + var(--x0)), calc(-50% + var(--y0)), 0) rotate(var(--spin)) scale(var(--scale0));
  }
}

@supports not (clip-path: path("M0 0L1 1")) {
  .soul-blob {
    clip-path: none;
    border-radius: 46% 54% 58% 42% / 48% 46% 54% 52%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .soul-blob {
    animation: none;
  }
}

.ai-debug-panel {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid rgba(10, 132, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.ai-debug-panel.has-error {
  border-color: rgba(217, 45, 32, 0.28);
  background: rgba(217, 45, 32, 0.06);
}

.ai-debug-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ai-debug-panel.has-error .ai-debug-status {
  color: var(--danger);
}

.ai-debug-panel pre {
  max-height: 150px;
  overflow: auto;
  margin: 8px 0 0;
  color: #3b4250;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.5;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panelFade {
  from {
    opacity: 0;
    transform: translateX(8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(480px, 1.35fr) minmax(280px, 0.8fr);
  gap: 18px;
  max-width: 1480px;
  margin: 0 auto;
}

.project-back-button {
  position: absolute;
  left: -58px;
  top: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(26, 31, 42, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 16px 38px rgba(36, 45, 65, 0.12);
  backdrop-filter: blur(18px);
}

.project-back-button:hover {
  transform: translateX(-2px);
}

.layout.view-entering {
  animation: viewIn 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.layout.project-loading .panel {
  position: relative;
  overflow: hidden;
  opacity: 0.72;
}

.layout.project-loading .panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.62) 42%, transparent 72%),
    rgba(248, 250, 253, 0.28);
  transform: translateX(-100%);
  animation: skeletonSweep 1.25s ease-in-out infinite;
  pointer-events: none;
}

.layout.project-loading::after {
  content: "正在加载项目详情...";
  position: absolute;
  left: 50%;
  top: -56px;
  z-index: 5;
  transform: translateX(-50%);
  min-height: 34px;
  padding: 8px 14px 8px 34px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(36, 45, 65, 0.12);
  backdrop-filter: blur(18px);
}

.layout.project-loading .project-back-button {
  pointer-events: auto;
}

.panel,
.sub-panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 14px 42px rgba(36, 45, 65, 0.1);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 20px;
}

.panel.home-card {
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.66)),
    rgba(255, 255, 255, 0.72);
  box-shadow:
    0 30px 84px rgba(36, 45, 65, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.sub-panel {
  margin-top: 18px;
  padding: 16px;
}

.task-admin-tools {
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr);
}

.task-admin-tools button {
  width: 100%;
}

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

.project-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.section-head.compact {
  margin-bottom: 14px;
}

.status-pill {
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent-dark);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.form-grid,
.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.project-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flow-grid.two {
  grid-template-columns: auto minmax(180px, 220px) auto minmax(180px, 1fr);
  align-items: end;
}

.flow-grid.single {
  grid-template-columns: minmax(180px, 240px);
}

.mode-action-grid {
  grid-template-columns: minmax(180px, 240px) auto;
  align-items: end;
}

.flow-grid.compact-flow {
  grid-template-columns: minmax(180px, 240px) minmax(180px, 220px);
  margin-bottom: 0;
}

.custom-workday-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.wide-label {
  margin-top: 8px;
}

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

.inline-actions.wrap {
  flex-wrap: wrap;
}

.inline-grid-button {
  align-self: end;
  width: 100%;
}

.table-card {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.table-toolbar > div {
  flex: 1;
  min-width: 0;
}

.hidden-file {
  display: none;
}

.personnel-collapse {
  display: grid;
  gap: 12px;
  padding: 14px;
  max-height: none;
  overflow: hidden;
  transition:
    max-height 0.2s ease,
    padding 0.2s ease,
    opacity 0.2s ease;
}

.personnel-collapse.preview-mode {
  position: relative;
}

.personnel-collapse.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

.personnel-editor {
  font-size: 13px;
}

.personnel-table {
  display: grid;
  max-height: 520px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(26, 31, 42, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
}

.personnel-table-row,
.archive-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1.1fr);
  gap: 12px;
  min-height: 38px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(26, 31, 42, 0.08);
  font-size: 13px;
}

.personnel-table-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.42);
}

.personnel-table-row input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.62);
}

.personnel-table-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(245, 247, 251, 0.96);
  color: var(--muted);
  font-weight: 800;
}

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

.personnel-table-row span:first-child {
  font-weight: 700;
}

.personnel-table-row span:last-child {
  color: var(--muted);
}

.personnel-delete-button {
  min-height: 34px;
  width: 34px;
  min-width: 34px;
  padding: 0;
  color: var(--danger);
}

.personnel-empty-row {
  padding: 18px 12px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid rgba(26, 31, 42, 0.08);
}

.personnel-fade-row {
  min-height: 54px;
  border-radius: 0 0 var(--radius) var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.94)),
    rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  box-shadow: none;
}

.personnel-fade-row + .personnel-add-row {
  margin-top: 0;
}

.personnel-add-row {
  display: grid;
  place-items: center;
  min-height: 52px;
  margin: 10px;
  border: 1px dashed rgba(26, 31, 42, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-dark);
  box-shadow: none;
}

.personnel-add-row span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.departure-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(245, 247, 251, 0.62);
}

.table-toolbar.compact {
  min-height: auto;
  padding: 0;
  border-bottom: 0;
}

.departure-list {
  display: grid;
  gap: 8px;
}

.departure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(26, 31, 42, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.departure-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.departure-row strong,
.departure-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-file {
  min-width: 180px;
}

.calendar-panel {
  display: grid;
  grid-template-columns: repeat(7, minmax(52px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 4px;
}

.day-cell {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  align-content: space-between;
  padding: 8px;
  text-align: left;
  box-shadow: none;
}

.day-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(36, 45, 65, 0.09);
}

.day-cell .day-number {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.day-cell .day-state {
  font-size: 11px;
}

.day-cell.is-workday {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(10, 132, 255, 0.1);
}

.day-cell.is-holiday {
  background: rgba(255, 255, 255, 0.54);
}

.day-cell.has-override {
  border-color: rgba(15, 138, 95, 0.42);
}

.attendance-detail-panel {
  margin-top: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.62);
}

.attendance-insight {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.latest-attendance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 13px;
  border: 1px solid rgba(10, 132, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.latest-attendance-card strong {
  color: var(--text);
  font-weight: 800;
}

.latest-download-button {
  background: rgba(17, 19, 24, 0.92);
  color: #fff;
  border-color: transparent;
  font-size: 18px;
}

.latest-attendance-card.empty-state {
  display: grid;
  min-height: 58px;
}

.files-list {
  display: grid;
  gap: 8px;
}

.file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  box-shadow: none;
}

.tab-button.active {
  border-color: rgba(10, 132, 255, 0.34);
  background: rgba(10, 132, 255, 0.12);
  color: var(--accent-dark);
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.65);
}

.file-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.file-row a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.transparent-button {
  border: 0;
  background: transparent;
  color: var(--text);
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.transparent-button:hover {
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
}

.latest-file-badge {
  justify-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  color: var(--muted);
  min-height: 80px;
  align-content: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(15, 20, 30, 0.32);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(720px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.wide-modal .modal-card {
  width: min(1120px, calc(100vw - 32px));
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.settings-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  min-height: min(72vh, 720px);
}

.settings-tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(245, 247, 251, 0.62);
}

.settings-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 13px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  box-shadow: none;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.settings-tab.active {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(36, 45, 65, 0.08);
}

.settings-content {
  min-width: 0;
}

.settings-tab-panel {
  display: none;
  min-width: 0;
  animation: panelFade 0.18s ease both;
}

.settings-tab-panel.active {
  display: block;
}

.settings-calendar {
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.template-box {
  display: none;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(245, 247, 251, 0.76);
  border: 1px solid var(--line);
}

.template-box.active {
  display: grid;
}

.template-picker-grid {
  display: grid;
  gap: 12px;
}

.template-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.template-picker > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.template-picker strong,
.template-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.password-form,
.account-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 247, 251, 0.72);
}

.password-form {
  grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
}

.accounts-list {
  display: grid;
  gap: 8px;
  max-height: min(48vh, 460px);
  overflow: auto;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.account-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-row strong {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.current-user-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
}

.risk-line {
  color: var(--success);
  font-size: 12px;
  line-height: 1.45;
}

.risk-line.medium {
  color: #b46900;
}

.risk-line.high {
  color: var(--danger);
}

.access-records {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 460px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 247, 251, 0.72);
}

.access-record-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}

.access-record-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.access-record-row.failed {
  border-color: rgba(217, 45, 32, 0.26);
  background: rgba(255, 246, 245, 0.74);
}

.access-record-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.access-record-row small,
.access-record-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
}

.feedback-form,
.feedback-board {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 247, 251, 0.72);
}

.feedback-form {
  display: grid;
  align-content: start;
  gap: 12px;
}

.feedback-board {
  display: grid;
  align-content: start;
  gap: 12px;
}

.feedback-archive-toggle {
  justify-self: end;
}

.feedback-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.feedback-ticket {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.76);
}

.feedback-ticket.urgent {
  border-color: rgba(217, 45, 32, 0.34);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 245, 0.72));
}

.feedback-ticket.archived {
  opacity: 0.74;
}

.feedback-ticket-head,
.feedback-badges {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.feedback-ticket-head > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.feedback-ticket-head strong {
  overflow-wrap: anywhere;
}

.feedback-badges {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.urgent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(217, 45, 32, 0.45);
  border-radius: 999px;
  color: var(--danger);
  background: rgba(217, 45, 32, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.feedback-progress-text {
  color: #303642;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.feedback-thread {
  display: grid;
  gap: 8px;
}

.feedback-message {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(245, 247, 251, 0.78);
}

.feedback-message.admin {
  background: rgba(10, 132, 255, 0.08);
}

.feedback-message > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.feedback-message p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feedback-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.feedback-admin-tools {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(180px, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.checkbox-line input {
  width: auto;
  min-height: auto;
}

.month-check-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 247, 251, 0.72);
}

.month-check-list.disabled {
  opacity: 0.58;
}

.early-people-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(245, 247, 251, 0.72);
}

.early-people-list.disabled {
  opacity: 0.7;
}

.early-person-item {
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.archive-actions {
  margin-bottom: 14px;
}

.archived-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 14px;
}

.archived-list.large {
  max-height: min(62vh, 620px);
}

.archive-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.archive-row > div {
  display: grid;
  gap: 4px;
}

.archive-row button {
  min-height: 30px;
}

.file-label input {
  background: #fff;
}

.ai-box {
  display: flex;
  align-items: end;
  gap: 10px;
}

.ai-debug-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.ai-debug-panel summary::-webkit-details-marker {
  display: none;
}

.debug-switch {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.month-step {
  align-self: end;
  background: rgba(255, 255, 255, 0.8);
  font-size: 22px;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  min-width: 240px;
  max-width: min(560px, calc(100vw - 32px));
  border-radius: 999px;
  background: rgba(21, 23, 28, 0.92);
  color: #fff;
  padding: 12px 18px;
  text-align: center;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  z-index: 10;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: rgba(217, 45, 32, 0.95);
}

@media (max-width: 1180px) {
  .attendance-home-grid,
  .task-home-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel,
  .dashboard-archive-card,
  .task-create-card,
  .task-board {
    min-height: auto;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .files-panel {
    order: 3;
  }
}

@media (max-width: 760px) {
  .app-page {
    padding: 16px;
  }

  .home-page {
    padding-inline: 16px;
  }

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

  .project-back-button {
    left: 0;
    top: -54px;
  }

  .top-actions {
    justify-content: stretch;
  }

  .project-select {
    width: 100%;
  }

  .form-grid,
  .flow-grid,
  .flow-grid.two,
  .mode-action-grid,
  .task-workbench-grid,
  .task-admin-tools,
  .archive-chip-row,
  .task-form-row,
  .task-date-strip,
  .dashboard-summary,
  .password-form,
  .account-form,
  .feedback-layout,
  .feedback-reply,
  .feedback-admin-tools,
  .access-record-row,
  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-tabs {
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    overflow-x: auto;
  }

  .home-tab-control {
    width: 100%;
    justify-content: stretch;
  }

  .home-tab-control button {
    flex: 1;
  }

  .dashboard-panel,
  .dashboard-archive-card,
  .task-create-card,
  .task-board {
    padding: 22px;
  }

  .task-timeline {
    grid-template-columns: 1fr;
  }

  .departure-row {
    grid-template-columns: 1fr;
  }

  .settings-tab {
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .calendar-panel {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    gap: 5px;
  }

  .day-cell {
    min-height: 56px;
    padding: 6px;
  }

  .day-cell .day-number {
    font-size: 14px;
  }

  .login-panel {
    padding: 30px;
  }
}

@media (max-width: 1580px) {
  .project-back-button {
    left: 0;
    top: -54px;
  }
}
