:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #20242a;
  --muted: #667085;
  --line: #d9dee7;
  --accent: #1f75cb;
  --accent-strong: #155ca4;
  --progress-color: #1f75cb;
  --success: #20805d;
  --warning: #b26a1b;
  --danger: #b42318;
  --soft-blue: #edf5ff;
  --soft-green: #eef8f3;
  --soft-yellow: #fff7e6;
  --soft-red: #fff1f0;
  --shadow: 0 8px 24px rgba(30, 41, 59, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid var(--line);
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand-title {
  font-size: 17px;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

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

.nav-tab {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.nav-tab:hover {
  background: #f5f8fb;
}

.nav-tab.is-active {
  color: var(--accent-strong);
  background: var(--soft-blue);
  border-color: #c9e2ff;
  font-weight: 700;
}

.nav-icon {
  width: 18px;
  text-align: center;
}

.main {
  padding: 28px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.25;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 17px;
}

.page-meta {
  margin: 6px 0 0;
  color: var(--muted);
}

.feedback-entry-btn {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #b7d7fb;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  text-align: left;
}

.employee-summary .feedback-entry-btn {
  width: 100%;
  gap: 10px;
}

.feedback-entry-btn:hover {
  border-color: var(--accent);
  background: var(--soft-blue);
}

.feedback-entry-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.feedback-entry-btn strong,
.feedback-entry-btn small {
  display: block;
}

.feedback-entry-btn strong {
  font-size: 18px;
  line-height: 1.1;
}

.feedback-entry-btn small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.select-field,
.task-form label,
.login-form label,
.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
}

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

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid #bddcff;
  border-color: var(--accent);
}

.employee-summary,
.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.admin-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.employee-summary .metric.wide {
  grid-column: auto;
}

.metric {
  min-width: 0;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: var(--shadow);
}

.metric.wide {
  grid-column: span 2;
}

.progress-metric {
  position: relative;
}

.metric-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric-topline .metric-label {
  margin-bottom: 0;
}

.progress-color-control {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}

.progress-color-control:hover {
  border-color: var(--progress-color);
  transform: translateY(-1px);
}

.progress-color-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.progress-color-dot {
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--progress-color);
  box-shadow: 0 0 0 1px rgba(32, 36, 42, 0.18);
  pointer-events: none;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
}

.inbox-entry {
  display: grid;
  align-content: center;
  gap: 3px;
}

.inbox-entry:hover {
  border-color: var(--accent);
  background: var(--soft-blue);
}

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

.progress-track {
  width: 100%;
  min-width: 0;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 160ms ease, background 160ms ease;
}

.content-grid,
.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
  align-items: start;
}

.admin-grid {
  grid-template-columns: 1.15fr 0.85fr;
}

.admin-grid.lower {
  margin-top: 16px;
}

.notification-panel {
  margin-bottom: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.public-questions-panel {
  margin-bottom: 16px;
}

.question-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px;
  gap: 8px;
  align-items: center;
}

.question-tools input,
.question-tools select {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.public-question-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.public-question-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.public-question-item:last-child {
  border-bottom: 0;
}

.public-question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.question-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f4f8;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.question-status.is-open {
  background: var(--soft-yellow);
  color: var(--warning);
}

.question-status.is-answered {
  background: var(--soft-blue);
  color: var(--accent-strong);
}

.question-status.is-resolved {
  background: var(--soft-green);
  color: var(--success);
}

.public-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.public-question-body {
  line-height: 1.65;
  white-space: pre-wrap;
}

.public-question-answer {
  display: grid;
  gap: 5px;
  border: 1px solid #c9e2ff;
  border-radius: 8px;
  background: var(--soft-blue);
  padding: 10px 12px;
}

.public-question-answer p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-head {
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.segmented-control {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f5f7fa;
}

.segment-btn {
  min-height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 5px 9px;
  font-size: 13px;
}

.segment-btn:hover {
  background: #fff;
}

.segment-btn.is-active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 1px 5px rgba(30, 41, 59, 0.08);
  font-weight: 700;
}

.section-head.compact {
  min-height: 44px;
  padding: 10px 16px;
}

.task-list {
  display: grid;
  max-height: 360px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.task-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.task-item:last-child {
  border-bottom: 0;
}

.task-item.is-selected {
  background: var(--soft-blue);
}

.task-title {
  font-weight: 750;
  margin-bottom: 5px;
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.deadline-text.is-overdue {
  color: var(--danger);
  font-weight: 700;
}

.deadline-text.is-soon {
  color: var(--warning);
  font-weight: 700;
}

.small-btn,
.primary-btn,
.danger-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 34px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #fff;
  color: var(--text);
}

.small-btn:hover {
  background: #f1f4f8;
}

.primary-btn {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

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

.primary-btn:disabled {
  border-color: var(--line);
  background: #eef1f5;
  color: #98a2b3;
  cursor: not-allowed;
}

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

.danger-btn:hover {
  background: var(--soft-red);
}

.danger-btn:disabled {
  border-color: var(--line);
  background: #eef1f5;
  color: #98a2b3;
  cursor: not-allowed;
}

.compact-btn {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
  white-space: nowrap;
}

.article-body {
  min-height: 360px;
  padding: 18px;
  line-height: 1.72;
}

.article-body p {
  margin: 0 0 12px;
}

.article-deadline {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

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

.article-deadline.is-soon {
  border-color: #f7c164;
  background: var(--soft-yellow);
}

.article-deadline.is-overdue {
  border-color: #ffa39e;
  background: var(--soft-red);
}

.article-deadline.is-overdue strong {
  color: var(--danger);
}

.article-deadline.is-soon strong {
  color: var(--warning);
}

.article-actions {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}

.comment-panel {
  border-top: 1px solid var(--line);
  background: #fff;
}

.comment-count {
  color: var(--muted);
  font-size: 12px;
}

.comment-list {
  display: grid;
  max-height: 320px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.comment-item {
  display: grid;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.comment-head strong {
  color: var(--text);
  font-size: 13px;
}

.comment-body {
  line-height: 1.6;
  white-space: pre-wrap;
}

.comment-form {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
}

.comment-form .primary-btn {
  justify-self: end;
}

.form-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
}

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

.form-message.is-success {
  color: var(--success);
}

.panel-message {
  min-height: 0;
  padding: 10px 16px 0;
}

.task-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid #b7d7fb;
  border-radius: 8px;
  background: #fff;
  color: var(--accent-strong);
  box-shadow: 0 16px 36px rgba(30, 41, 59, 0.18);
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.task-toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.feedback-drawer {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.feedback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.24);
}

.feedback-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(720px, 100%);
  height: 100%;
  overflow: auto;
  background: #fff;
  box-shadow: -18px 0 42px rgba(30, 41, 59, 0.18);
  padding: 34px 36px;
}

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

.feedback-panel-head h2 {
  font-size: 36px;
}

.feedback-panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.feedback-options {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.feedback-option {
  min-height: 124px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid #9da4ae;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  padding: 14px 18px;
  text-align: left;
}

.feedback-option:hover,
.feedback-option.is-active {
  border-color: var(--accent);
  background: var(--soft-blue);
}

.feedback-face {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #333;
  font-size: 46px;
  line-height: 1;
}

.feedback-option strong {
  display: block;
  font-size: 26px;
  line-height: 1.25;
}

.feedback-option small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.feedback-form {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.feedback-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.feedback-form .primary-btn {
  justify-self: start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f4f8;
  color: var(--muted);
  font-size: 12px;
}

.status-pill.is-done {
  background: var(--soft-green);
  color: var(--success);
  font-weight: 700;
}

.deadline-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f1f4f8;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}

.deadline-pill.is-overdue {
  background: var(--soft-red);
  color: var(--danger);
  font-weight: 700;
}

.deadline-pill.is-soon {
  background: var(--soft-yellow);
  color: var(--warning);
  font-weight: 700;
}

.deadline-pill.is-done {
  background: var(--soft-green);
  color: var(--success);
}

.system-notice {
  margin-bottom: 16px;
  border: 1px solid #f7c164;
  border-radius: 8px;
  background: var(--soft-yellow);
  color: #7a4608;
  padding: 12px 14px;
  font-size: 14px;
}

.notification-list {
  display: grid;
  max-height: 260px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.notification-item,
.notification-permission {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child,
.notification-permission:last-child {
  border-bottom: 0;
}

.notification-item.is-new {
  background: var(--soft-blue);
}

.notification-item.is-soon {
  background: var(--soft-yellow);
}

.notification-item.is-overdue {
  background: var(--soft-red);
}

.notification-title {
  font-weight: 800;
}

.notification-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.notification-item.is-overdue .notification-title,
.notification-item.is-overdue .notification-meta {
  color: var(--danger);
}

.notification-item.is-soon .notification-title {
  color: var(--warning);
}

.notification-permission {
  background: #fbfcfd;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow: auto;
  scrollbar-gutter: stable;
}

.employee-progress-scroll {
  max-height: 372px;
}

.task-rate-scroll {
  max-height: 360px;
}

.table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: #fbfcfd;
}

td {
  font-size: 14px;
}

.row-progress {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
  align-items: center;
  min-width: 170px;
}

.row-progress span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.task-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.department-fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.department-fieldset legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.check-option {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.check-option input {
  width: 15px;
  height: 15px;
  padding: 0;
  accent-color: var(--accent);
}

.task-form .primary-btn {
  justify-self: start;
}

.recent-list {
  display: grid;
  max-height: 292px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.feedback-inbox-panel {
  margin-top: 16px;
}

.question-inbox-panel {
  margin-top: 16px;
}

.feedback-inbox-list,
.question-inbox-list {
  display: grid;
  max-height: 420px;
  overflow: auto;
  scrollbar-gutter: stable;
}

.feedback-inbox-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.feedback-inbox-item:last-child {
  border-bottom: 0;
}

.feedback-inbox-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.feedback-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f4f8;
  color: var(--muted);
  font-weight: 700;
}

.feedback-type.is-like {
  background: var(--soft-green);
  color: var(--success);
}

.feedback-type.is-dislike {
  background: var(--soft-red);
  color: var(--danger);
}

.feedback-type.is-suggestion {
  background: var(--soft-blue);
  color: var(--accent-strong);
}

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

.feedback-inbox-body {
  line-height: 1.65;
  white-space: pre-wrap;
}

.question-admin-item {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.question-admin-item:last-child {
  border-bottom: 0;
}

.question-admin-answer small {
  color: var(--muted);
  font-size: 12px;
}

.question-answer-form {
  display: grid;
  gap: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.question-answer-form textarea {
  min-height: 86px;
  resize: vertical;
}

.question-answer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.recent-item {
  min-height: 58px;
  display: grid;
  gap: 4px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.recent-item:last-child {
  border-bottom: 0;
}

.recent-main {
  font-weight: 700;
}

.recent-meta,
.empty-state {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  padding: 18px;
}

.empty-table {
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 8%, rgba(31, 117, 203, 0.16), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(32, 128, 93, 0.12), transparent 28%),
    var(--bg);
}

.portal-main {
  width: min(520px, 100%);
}

.portal-auth-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(30, 41, 59, 0.14);
}

.portal-auth-banner {
  min-height: 150px;
  display: flex;
  align-items: flex-start;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(31, 117, 203, 0.96), rgba(42, 181, 236, 0.92) 54%, rgba(143, 223, 218, 0.92)),
    var(--accent);
  color: #fff;
}

.portal-auth-banner .brand {
  margin-bottom: 0;
}

.portal-auth-banner .brand-mark {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.portal-auth-banner .brand-subtitle {
  color: rgba(255, 255, 255, 0.78);
}

.portal-auth-body {
  padding: 26px;
}

.auth-title {
  display: grid;
  gap: 6px;
  margin-bottom: 4px;
}

.auth-title h1 {
  font-size: 26px;
}

.auth-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 14px;
  align-items: start;
}

.auth-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.auth-form .primary-btn {
  width: 100%;
}

.auth-field {
  gap: 7px;
}

.auth-field input {
  height: 46px;
  border-radius: 7px;
  font-size: 16px;
}

.auth-field select {
  height: 46px;
  border-radius: 7px;
  font-size: 16px;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle:hover {
  background: #f1f4f8;
  color: var(--accent-strong);
}

.eye-icon {
  position: relative;
  width: 19px;
  height: 12px;
  border: 1.8px solid currentColor;
  border-radius: 999px / 80%;
}

.eye-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.eye-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-38deg);
}

.password-toggle.is-visible .eye-icon::after {
  opacity: 1;
}

.portal-submit {
  min-height: 48px;
  margin-top: 4px;
  font-size: 17px;
}

.portal-message {
  min-height: 22px;
  margin-top: 14px;
}

.portal-login {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.login-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.auth-switch {
  min-height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 5px;
}

.link-btn:hover {
  background: var(--soft-blue);
}

.session-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 4px 4px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.session-box strong {
  font-size: 13px;
  white-space: nowrap;
}

.portal-card {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portal-card:hover {
  border-color: #b7d7fb;
  background: var(--soft-blue);
}

.portal-card strong {
  font-size: 20px;
}

.portal-card span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.portal-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--soft-blue);
  color: var(--accent-strong);
  font-weight: 800;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px;
  }

  .brand {
    margin-bottom: 0;
  }

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

  .main {
    padding: 16px;
  }

  .page-head {
    display: grid;
  }

  .employee-summary,
  .admin-summary,
  .content-grid,
  .admin-grid,
  .auth-grid,
  .portal-grid,
  .login-form {
    grid-template-columns: 1fr;
  }

  .metric.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .sidebar {
    align-items: stretch;
    display: grid;
  }

  .employee-summary,
  .admin-summary {
    gap: 8px;
  }

  h1 {
    font-size: 23px;
  }

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

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

  .feedback-panel {
    padding: 24px 18px;
  }

  .feedback-panel-head {
    display: grid;
  }

  .feedback-panel-head h2 {
    font-size: 30px;
  }

  .feedback-option {
    grid-template-columns: 1fr;
  }

  .segmented-control,
  .question-tools,
  .department-options {
    width: 100%;
  }

  .question-tools,
  .department-options {
    grid-template-columns: 1fr;
  }
}
