@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #eef3fb;
  --surface-strong: #0f1f46;
  --line: #dbe4f0;
  --line-strong: #bfd0e3;
  --text: #10233f;
  --muted: #5d6b82;
  --primary: #1f4fd6;
  --primary-soft: #e8efff;
  --secondary: #4f7cff;
  --success: #22a06b;
  --success-soft: #e6f8f0;
  --warning: #f08c2e;
  --warning-soft: #fff1e0;
  --danger: #d9485f;
  --danger-soft: #fee8ec;
  --gray: #7c879a;
  --gray-soft: #f0f3f8;
  --shadow: 0 24px 60px rgba(15, 31, 70, 0.14);
  --shadow-soft: 0 14px 34px rgba(20, 40, 90, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --sidebar-w: 280px;
  --content-max: 1560px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Noto Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  cursor: pointer;
  border: 0;
}

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

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-view {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at top left, rgba(79, 124, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #e8eefc 0%, #f3f6fb 40%, #e7edf8 100%);
}

.login-shell {
  max-width: 1480px;
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.login-copy {
  padding: 48px 36px 48px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--secondary), var(--surface-strong));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-soft);
}

.brand-lockup h1 {
  margin: 4px 0 0;
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.04;
}

.login-summary {
  max-width: 620px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.hero-points {
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.hero-points li {
  position: relative;
  padding-left: 22px;
  color: var(--text);
  font-size: 15px;
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--success));
}

.hero-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 620px;
}

.hero-signal-grid article {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.hero-signal-grid strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.hero-signal-grid span {
  color: var(--muted);
  font-size: 14px;
}

.login-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.login-illustration {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 290px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.login-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.illustration-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.illustration-caption span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(10, 18, 42, 0.6);
  color: #fff;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(14px);
}

.login-card {
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.card-head p {
  margin: 0 0 24px;
  color: var(--muted);
}

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

.login-form label,
.form-field {
  display: grid;
  gap: 8px;
}

.login-form span,
.form-field > span,
.field-label {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 13px 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(31, 79, 214, 0.12);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.login-options,
.toolbar-row,
.filter-row,
.section-head,
.detail-actions,
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.ghost-link,
.ghost-btn {
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.icon-btn:hover,
.icon-pill:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 24px rgba(31, 79, 214, 0.26);
}

.secondary-btn {
  color: var(--primary);
  background: var(--primary-soft);
}

.ghost-btn {
  color: var(--muted);
  background: var(--gray-soft);
}

.danger-btn {
  color: #fff;
  background: linear-gradient(135deg, #cc455a, var(--danger));
}

.large-btn {
  min-height: 52px;
}

.inline-error,
.field-error {
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
}

.field-error {
  padding: 0;
  background: transparent;
}

.demo-accounts {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.demo-account {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.demo-account strong {
  display: block;
  margin-bottom: 6px;
}

.demo-account span {
  color: var(--muted);
  font-size: 12px;
}

.app-view {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background:
    radial-gradient(circle at top, rgba(79, 124, 255, 0.2), transparent 35%),
    linear-gradient(180deg, #112553 0%, #0d1838 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 24px;
}

.sidebar-brand strong {
  display: block;
  margin-bottom: 4px;
}

.sidebar-brand span:last-child {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
  text-align: left;
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 10px 8px;
}

.foot-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4ce4a0;
  box-shadow: 0 0 14px rgba(76, 228, 160, 0.8);
}

.app-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 28px;
  background: rgba(243, 246, 251, 0.84);
  border-bottom: 1px solid rgba(219, 228, 240, 0.8);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-left h2 {
  margin: 0;
  font-size: 28px;
}

.topbar-right {
  justify-content: flex-end;
}

.page-stage {
  width: min(100%, var(--content-max));
  margin: 0 auto;
  padding: 24px 28px 120px;
}

.page-content {
  display: grid;
  gap: 22px;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.banner.ok {
  background: var(--success-soft);
  color: var(--success);
}

.banner.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--secondary), var(--surface-strong));
}

.user-meta {
  display: grid;
  gap: 2px;
}

.user-meta strong {
  font-size: 14px;
}

.user-meta span {
  font-size: 12px;
  color: var(--muted);
}

.icon-btn,
.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

.icon-btn {
  width: 42px;
  padding: 0;
}

.icon-btn span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.mobile-only {
  display: none;
}

.grid-4,
.grid-3,
.grid-2 {
  display: grid;
  gap: 18px;
}

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

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

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

.panel,
.stat-card,
.metric-card,
.chart-card,
.table-card,
.detail-card,
.settings-card,
.workflow-card,
.empty-card,
.quick-card {
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid rgba(219, 228, 240, 0.92);
  box-shadow: var(--shadow-soft);
}

.panel,
.chart-card,
.table-card,
.detail-card,
.settings-card,
.workflow-card,
.empty-card {
  padding: 22px;
}

.stat-card,
.metric-card,
.quick-card {
  padding: 20px;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -50px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(79, 124, 255, 0.08);
}

.card-topline {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 18px;
}

.stat-value,
.metric-value {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.section-title,
.table-title {
  margin: 0;
  font-size: 20px;
}

.section-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.list-stack,
.timeline,
.comment-stack,
.upload-list,
.feed-list {
  display: grid;
  gap: 14px;
}

.list-item,
.comment-item,
.upload-item,
.feed-item {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-alt);
  border: 1px solid rgba(219, 228, 240, 0.8);
}

.list-item strong,
.comment-item strong,
.feed-item strong {
  display: block;
  margin-bottom: 6px;
}

.list-meta,
.subline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill,
.ghost-pill,
.role-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

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

.status-pill.progress {
  color: var(--primary);
  background: var(--primary-soft);
}

.status-pill.approved {
  color: var(--success);
  background: var(--success-soft);
}

.status-pill.rejected {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-pill.withdrawn,
.ghost-pill,
.role-pill {
  color: var(--gray);
  background: var(--gray-soft);
}

.role-pill.admin {
  color: var(--primary);
  background: var(--primary-soft);
}

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

.quick-card {
  display: grid;
  gap: 8px;
  align-content: start;
}

.quick-card strong {
  font-size: 16px;
}

.quick-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.chart-stage {
  min-height: 240px;
}

.mini-legend,
.legend-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.legend-row span::before,
.mini-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.legend-row span[data-color="blue"]::before,
.mini-legend span[data-color="blue"]::before {
  background: var(--primary);
}

.legend-row span[data-color="green"]::before,
.mini-legend span[data-color="green"]::before {
  background: var(--success);
}

.legend-row span[data-color="orange"]::before,
.mini-legend span[data-color="orange"]::before {
  background: var(--warning);
}

.legend-row span[data-color="red"]::before,
.mini-legend span[data-color="red"]::before {
  background: var(--danger);
}

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

.filter-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(219, 228, 240, 0.9);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

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

.tiny-btn,
.tiny-ghost,
.tiny-danger {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

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

.tiny-ghost {
  color: var(--primary);
  background: var(--primary-soft);
}

.tiny-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

.empty-card {
  text-align: center;
  padding-block: 42px;
}

.empty-card h3 {
  margin: 0 0 8px;
}

.empty-card p {
  margin: 0 auto 18px;
  max-width: 380px;
  color: var(--muted);
  line-height: 1.7;
}

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

.approval-type {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  text-align: left;
}

.approval-type.active {
  border-color: var(--primary);
  background: linear-gradient(180deg, #fff 0%, #eff4ff 100%);
  box-shadow: inset 0 0 0 1px rgba(31, 79, 214, 0.18);
}

.approval-type strong {
  display: block;
  margin-bottom: 8px;
}

.approval-type p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.required::after {
  content: " *";
  color: var(--danger);
}

.upload-zone {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-alt);
}

.upload-zone input {
  padding: 0;
  border: 0;
  background: transparent;
}

.progress {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 79, 214, 0.12);
  overflow: hidden;
}

.progress > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 13px;
  width: 2px;
  background: var(--line);
}

.timeline-node {
  position: relative;
  padding-left: 40px;
}

.timeline-node::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 6px #fff;
}

.timeline-node.done::before {
  background: var(--success);
}

.timeline-node.current::before {
  background: var(--primary);
}

.timeline-node.rejected::before {
  background: var(--danger);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

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

.kv {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-alt);
}

.kv span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.kv strong {
  font-size: 14px;
  line-height: 1.6;
}

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

.record-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(219, 228, 240, 0.8);
}

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

.record-row span {
  color: var(--muted);
}

.attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-alt);
}

.department-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

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

.tree-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1px solid transparent;
}

.tree-item.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-alt);
}

.rank-no {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

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

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

.toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.toast-root {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 60;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #fff;
  box-shadow: var(--shadow);
  animation: float-in 0.24s ease;
}

.toast.success {
  background: linear-gradient(135deg, var(--success), #159462);
}

.toast.error {
  background: linear-gradient(135deg, var(--danger), #c8374f);
}

.toast.info {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.modal-root.active {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 14, 32, 0.42);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(92vw, 580px);
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.modal-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

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

.loader {
  display: grid;
  place-items: center;
  min-height: 200px;
}

.loader::before {
  content: "";
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(31, 79, 214, 0.14);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

.mobile-cards {
  display: none;
  gap: 12px;
}

.mobile-record {
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(219, 228, 240, 0.92);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 10px;
}

.mobile-record h4 {
  margin: 0;
  font-size: 16px;
}

.mobile-record .actions-row {
  padding-top: 4px;
}

.bottom-bar {
  position: sticky;
  bottom: 0;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(243, 246, 251, 0), rgba(243, 246, 251, 1) 32%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1279px) {
  .login-shell,
  .detail-grid,
  .department-shell {
    grid-template-columns: 1fr;
  }

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

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

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

  .sidebar {
    width: 88px;
    flex-basis: 88px;
    padding-inline: 10px;
  }

  .sidebar-brand div,
  .nav-item span,
  .sidebar-foot {
    display: none;
  }

  .sidebar-brand,
  .nav-item {
    justify-content: center;
  }
}

@media (max-width: 1023px) {
  .login-view {
    padding: 16px;
  }

  .login-shell {
    min-height: auto;
  }

  .grid-3,
  .grid-2,
  .settings-grid,
  .form-grid,
  .kv-grid {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(82vw, 300px);
    flex-basis: auto;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 40;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-brand div,
  .nav-item span,
  .sidebar-foot {
    display: block;
  }

  .sidebar-brand,
  .nav-item {
    justify-content: flex-start;
  }

  .mobile-only {
    display: inline-flex;
  }

  .page-stage,
  .topbar {
    padding-inline: 18px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-left h2 {
    font-size: 24px;
  }
}

@media (max-width: 767px) {
  .login-copy {
    padding: 12px 4px;
  }

  .login-card-wrap {
    padding: 0;
  }

  .hero-signal-grid,
  .demo-accounts,
  .grid-4,
  .quick-actions,
  .approval-types,
  .filter-grid,
  .filter-grid.compact {
    grid-template-columns: 1fr;
  }

  .login-card,
  .panel,
  .chart-card,
  .table-card,
  .detail-card,
  .settings-card,
  .workflow-card,
  .empty-card {
    padding: 18px;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-right .secondary-btn,
  .topbar-right .ghost-btn {
    display: none;
  }

  .user-badge {
    flex: 1;
  }

  .topbar-left h2 {
    font-size: 20px;
  }

  .table-wrap {
    display: none;
  }

  .mobile-cards {
    display: grid;
  }

  .record-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .detail-actions {
    display: none;
  }

  .bottom-bar {
    display: flex;
  }
}
