:root {
  --blue: #1556a6;
  --blue-2: #0b67d8;
  --blue-3: #eef6ff;
  --nav: #0752a8;
  --nav-2: #003f91;
  --text: #172033;
  --muted: #667085;
  --light: #8a96a8;
  --line: #dde7f3;
  --bg: #f6f9fd;
  --card: #ffffff;
  --green: #18a15f;
  --orange: #f27a1a;
  --red: #d92d3d;
  --purple: #5757e8;
  --shadow: 0 18px 46px rgba(32, 64, 102, 0.08);
  --shadow-soft: 0 8px 22px rgba(32, 64, 102, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 4%, rgba(21, 86, 166, 0.08), transparent 28%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 45%, #f5f8fc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 32px 20px 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(160deg, var(--nav) 0%, var(--nav-2) 100%);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px 34px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 31px;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 14px 30px rgba(0, 34, 88, 0.22);
}

.brand-title {
  font-size: 24px;
  font-weight: 950;
  letter-spacing: 0;
}

.brand-subtitle {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.nav {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.nav a,
.nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  text-align: left;
  font-size: 17px;
  font-weight: 850;
}

.nav a.active,
.nav button.active {
  background: linear-gradient(135deg, #3489ff, #176ae2);
  color: #fff;
  box-shadow: 0 16px 34px rgba(0, 38, 96, 0.24);
}

.nav a:hover,
.nav button:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-icon,
.btn-img {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.side-illustration {
  position: absolute;
  left: 0;
  right: -92px;
  bottom: 102px;
  height: 150px;
  opacity: 0.14;
  pointer-events: none;
  background: url("assets/sidebar-ujv-line.png") left bottom / contain no-repeat;
}

.side-card {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 28px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(0, 78, 173, 0.72);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0, 30, 80, 0.24);
}

.side-avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7fbff, #dceeff);
  color: var(--blue);
  font-weight: 950;
}

.side-avatar {
  width: 42px;
  height: 42px;
}

.side-card-main {
  font-size: 17px;
  font-weight: 950;
}

.side-card-sub {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.side-caret {
  color: rgba(255, 255, 255, 0.8);
}

.main {
  min-width: 0;
  padding: 36px 42px 46px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: -36px -42px 30px;
  padding: 34px 42px 20px;
  background: rgba(246, 249, 253, 0.9);
  backdrop-filter: blur(14px);
}

.page-head {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 18px;
}

.title-line {
  width: 6px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
}

.page-title {
  font-size: 32px;
  line-height: 1;
  font-weight: 950;
}

.page-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.search-box {
  position: relative;
  width: min(360px, 30vw);
}

.search-box input {
  width: 100%;
  height: 52px;
  padding: 0 50px 0 18px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

.search-box img {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 22px;
  height: 22px;
  object-fit: contain;
  transform: translateY(-50%);
}

.primary-btn,
.ghost-btn,
.danger-btn,
.mini-btn {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 850;
}

.primary-btn {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 10px 20px rgba(21, 86, 166, 0.16);
}

.ghost-btn {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-color: #d7e2ef;
  color: #1d3152;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.refresh-btn {
  width: 112px;
}

.logout-btn {
  color: inherit;
}

.user-chip {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 999px;
  color: #172033;
  text-decoration: none;
}

.user-chip small {
  color: var(--muted);
}

.user-avatar-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.danger-btn {
  background: #fff4f5;
  border-color: #ffd0d5;
  color: var(--red);
}

.mini-btn {
  min-height: 32px;
  padding: 0 12px;
  background: var(--blue-3);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.content {
  display: grid;
  gap: 24px;
  align-items: start;
  transition: opacity 0.16s ease;
}

.is-busy .content {
  opacity: 0.58;
}

.card,
.metric-card,
.schedule-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(211, 224, 239, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 26px;
}

.panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 950;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e6edf5;
}

.panel-head a {
  color: var(--blue-2);
  font-weight: 850;
  text-decoration: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.metric-card {
  min-height: 150px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.metric-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.metric-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.metric-blue {
  background: #eaf3ff;
  color: var(--blue);
}

.metric-orange {
  background: #fff0e3;
  color: var(--orange);
}

.metric-green {
  background: #e8f8ef;
  color: var(--green);
}

.metric-purple {
  background: #efefff;
  color: var(--purple);
}

.metric-card span {
  color: #344054;
  font-size: 16px;
  font-weight: 850;
}

.metric-card strong {
  display: inline-block;
  margin-top: 8px;
  color: #101a33;
  font-size: 38px;
  line-height: 1;
  font-weight: 950;
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--blue-2);
  font-size: 14px;
  font-weight: 750;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 1.08fr) minmax(250px, 0.62fr);
  gap: 24px;
  align-items: start;
}

.quick-panel {
  min-height: 100%;
}

.quick-panel h2 {
  margin-bottom: 28px;
}

.quick-list {
  display: grid;
  gap: 22px;
}

.quick-action {
  min-height: 98px;
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #dce7f3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  color: #18243c;
  text-decoration: none;
}

.quick-action:hover {
  border-color: #b8d3f5;
  transform: translateY(-1px);
}

.quick-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
}

.quick-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.quick-action strong {
  font-size: 17px;
}

.quick-action em {
  color: #172033;
  font-style: normal;
  font-size: 22px;
}

.compact-list {
  display: grid;
  gap: 0;
}

.compact-row,
.notice-row,
.task-row,
.review-row,
.task-progress-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 14px 0;
  border-bottom: 1px solid #e6edf5;
}

.compact-row:last-child,
.notice-row:last-child,
.task-row:last-child,
.review-row:last-child,
.task-progress-row:last-child {
  border-bottom: 0;
}

.row-main {
  min-width: 0;
}

.compact-row strong,
.notice-row strong,
.task-row strong,
.review-row strong,
.task-progress-row strong {
  color: #172033;
  font-size: 16px;
  font-weight: 950;
}

.compact-row p,
.notice-row p,
.task-row p,
.review-row p,
.task-progress-row p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-row time,
.task-progress-row time {
  color: #71809a;
  white-space: nowrap;
}

.row-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.row-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.soft-orange {
  background: #fff1e4;
  color: var(--orange);
}

.soft-green {
  background: #e8f8ef;
  color: var(--green);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--blue-3);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.tag.green {
  background: #e8f8ef;
  color: var(--green);
}

.tag.orange {
  background: #fff1e4;
  color: var(--orange);
}

.tag.red {
  background: #fff0ef;
  color: var(--red);
}

.task-progress-row {
  grid-template-columns: auto minmax(0, 1fr) 128px auto;
}

.progress-cell {
  display: grid;
  gap: 8px;
  color: #71809a;
  font-size: 13px;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #176ae2, #4f9cff);
}

.split {
  display: grid;
  grid-template-columns: minmax(340px, 0.78fr) minmax(560px, 1.22fr);
  gap: 24px;
  align-items: start;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

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

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 850;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.input,
.select {
  height: 42px;
  padding: 0 12px;
}

.textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 15px 16px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  white-space: nowrap;
}

.table th {
  background: #f8fbff;
  color: #475467;
  font-size: 13px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-actions,
.review-side,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions form,
.row-actions form,
.review-side form {
  margin: 0;
}

.notice-row,
.task-row,
.review-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.task-row small {
  display: block;
  margin-top: 8px;
  color: #475467;
}

.task-center-row {
  align-items: flex-start;
}

.task-meta-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.task-side-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.task-side-actions form,
.inline-review {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-wrap: wrap;
}

.signup-review-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.inline-review {
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7fbff;
  color: #344054;
  font-size: 13px;
}

.task-layout {
  display: grid;
  grid-template-columns: minmax(520px, 0.92fr) minmax(520px, 1.08fr);
  gap: 24px;
  align-items: start;
}

.task-publish-panel {
  padding: 26px;
}

.publish-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.publish-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

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

.type-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7fbff;
}

.type-switch label {
  cursor: pointer;
}

.type-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-switch span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 10px;
  color: #475467;
  font-weight: 900;
}

.type-switch input:checked + span {
  background: #fff;
  color: var(--blue);
  box-shadow: var(--shadow-soft);
}

.publish-section {
  display: grid;
  gap: 14px;
}

.task-publish-form > .publish-section:not(.disclosure) {
  padding: 16px;
  border: 1px solid #e2ebf6;
  border-radius: 16px;
  background: #fbfdff;
}

.form-grid.compact {
  gap: 12px;
}

.disclosure {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  overflow: hidden;
}

.disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 56px;
  padding: 0 16px;
  cursor: pointer;
  list-style: none;
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary span {
  font-weight: 950;
}

.disclosure summary em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.disclosure[open] {
  padding-bottom: 16px;
}

.disclosure[open] > .form-grid,
.disclosure[open] > .field {
  padding: 0 16px;
}

.visibility-card[open] {
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

.visibility-card[open] > .visibility-grid {
  padding: 0 16px;
}

.visibility-grid {
  display: grid;
  gap: 12px;
}

.visibility-mode {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.visibility-mode label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.visibility-mode label:hover {
  border-color: #b9d4f5;
  box-shadow: 0 10px 24px rgba(21, 86, 166, 0.08);
  transform: translateY(-1px);
}

.visibility-mode label.selected {
  border-color: var(--blue);
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  box-shadow: 0 12px 28px rgba(21, 86, 166, 0.12);
}

.visibility-mode label.selected::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
}

.visibility-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility-mode span {
  color: #12233d;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.visibility-targets {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce8f5;
  border-radius: 16px;
  background: #fff;
}

.visibility-all-hint {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border: 1px dashed #c8d9ef;
  border-radius: 12px;
  background: #f8fbff;
  color: #66758a;
  font-size: 14px;
  font-weight: 850;
}

.activity-options,
.visibility-target,
.assigned-participants,
.task-publish-form.is-activity .task-only {
  display: none;
}

.task-publish-form.is-activity .activity-options,
.visibility-target.show {
  display: block;
}

.visibility-target.show,
.task-publish-form.is-assigned-signup .assigned-participants {
  display: grid;
}

.task-publish-form.has-scoped-visibility .visibility-all-hint {
  display: none;
}

.publish-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 2px 0;
}

.publish-actions .primary-btn {
  min-width: 120px;
  min-height: 44px;
}

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

.native-multi-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.multi-picker {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.multi-picked {
  display: flex;
  min-height: 30px;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.multi-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.multi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-3);
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.multi-chip span {
  font-size: 16px;
  line-height: 1;
}

.multi-search-wrap {
  position: relative;
}

.multi-search {
  width: 100%;
  height: 40px;
  padding: 0 86px 0 12px;
  border: 1px solid #dce7f3;
  border-radius: 10px;
  outline: none;
  background: #f8fbff;
}

.multi-count {
  position: absolute;
  right: 10px;
  top: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  transform: translateY(-50%);
}

.multi-options {
  display: grid;
  max-height: 220px;
  overflow: auto;
  gap: 6px;
}

.multi-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #344054;
  text-align: left;
}

.multi-option:hover {
  background: #f6faff;
}

.multi-option.selected {
  border-color: #b9d6fb;
  background: #edf5ff;
  color: var(--blue);
}

.multi-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-option i {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.multi-no-result {
  padding: 12px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 850;
}

.duty-page {
  display: grid;
  grid-template-columns: minmax(520px, 0.95fr) minmax(560px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.duty-settings-card,
.duty-upload-card {
  padding: 26px;
}

.setting-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.setting-block h3 {
  margin: 0 0 14px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.schedule-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

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

.schedule-file {
  font-weight: 950;
}

.schedule-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.schedule-card form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

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

.export-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.export-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e8f8ef;
  color: var(--green);
  font-weight: 850;
}

.alert.error {
  background: #fff0ef;
  color: var(--red);
}

.ajax-toast {
  position: fixed;
  z-index: 80;
  top: 20px;
  right: 24px;
  max-width: min(380px, calc(100vw - 48px));
  padding: 12px 16px;
  border-radius: 14px;
  background: #172033;
  color: #fff;
  box-shadow: 0 18px 46px rgba(16, 24, 40, 0.2);
  font-weight: 850;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ajax-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.ajax-toast.error {
  background: var(--red);
}

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(21, 86, 166, 0.14), transparent 28%),
    linear-gradient(135deg, #f6f9fd 0%, #eaf3ff 100%);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(460px, 100%);
  padding: 34px;
  border: 1px solid rgba(214, 225, 240, 0.95);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 24px 0 8px;
  font-size: 28px;
}

.login-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}

.login-brand {
  padding: 0;
  color: var(--text);
}

.login-brand .brand-mark {
  border-color: var(--blue);
  color: var(--blue);
}

.login-brand .brand-subtitle {
  color: var(--muted);
}

.primary-btn.full {
  width: 100%;
}

@media (max-width: 1440px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .main {
    padding: 30px 30px 40px;
  }

  .topbar {
    margin: -30px -30px 26px;
    padding: 28px 30px 18px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  }

  .quick-panel {
    grid-column: 1 / -1;
  }

  .quick-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .quick-action {
    min-height: 76px;
  }
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 18px;
    overflow: visible;
  }

  .brand {
    padding-bottom: 16px;
  }

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

  .nav a,
  .nav button {
    min-height: 46px;
    justify-content: center;
    padding: 0 10px;
    font-size: 14px;
  }

  .nav-icon {
    display: none;
  }

  .side-card,
  .side-illustration {
    display: none;
  }

  .topbar,
  .top-actions {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .search-box {
    width: min(100%, 420px);
  }

  .metric-grid,
  .dashboard-grid,
  .task-layout,
  .duty-page,
  .split,
  .content-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

  .quick-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 22px 16px 32px;
  }

  .topbar {
    margin: -22px -16px 20px;
    padding: 20px 16px 16px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-desc {
    white-space: normal;
  }

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

  .metric-card {
    min-height: 120px;
    padding: 20px;
  }

  .dashboard-grid,
  .metric-grid,
  .quick-list,
  .form-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .compact-row,
  .task-progress-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .compact-row time,
  .compact-row .tag,
  .task-progress-row time,
  .progress-cell {
    grid-column: 2;
  }

  .schedule-card form {
    grid-template-columns: 1fr;
  }

  .visibility-mode {
    gap: 6px;
  }

  .visibility-mode label {
    min-height: 42px;
    padding: 0 6px;
  }

  .visibility-mode span {
    font-size: 13px;
  }
}
