:root {
  --bg: #f2efe8;
  --bg-strong: #e6dcc8;
  --surface: rgba(255, 250, 243, 0.86);
  --surface-strong: #fff8ee;
  --surface-dark: #142126;
  --text: #18232a;
  --text-soft: #5f6a70;
  --line: rgba(24, 35, 42, 0.1);
  --line-strong: rgba(24, 35, 42, 0.18);
  --primary: #0f7b6c;
  --primary-strong: #0b5d52;
  --accent: #cb8f3d;
  --danger: #b24735;
  --warning: #d7892c;
  --success: #2d8a63;
  --shadow: 0 18px 50px rgba(24, 35, 42, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Bahnschrift", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(203, 143, 61, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(15, 123, 108, 0.15), transparent 30%),
    linear-gradient(180deg, #f4ead5 0%, #f5f1ea 46%, #eef1eb 100%);
  color: var(--text);
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(28px);
  z-index: 0;
  pointer-events: none;
}

body::before {
  width: 280px;
  height: 280px;
  top: 5%;
  left: -60px;
  background: rgba(203, 143, 61, 0.14);
}

body::after {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: 10%;
  background: rgba(15, 123, 108, 0.12);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

a {
  color: inherit;
}

#app {
  position: relative;
  z-index: 1;
}

.login-shell,
.app-shell {
  min-height: 100vh;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-panel {
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.login-hero {
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: auto 30px 24px auto;
  width: 220px;
  height: 220px;
  background: linear-gradient(145deg, rgba(15, 123, 108, 0.15), rgba(203, 143, 61, 0.2));
  border-radius: 42px;
  transform: rotate(18deg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 123, 108, 0.1);
  color: var(--primary-strong);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.hero-title {
  margin: 18px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
}

.hero-desc,
.muted {
  color: var(--text-soft);
  line-height: 1.7;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.mini-stat,
.metric-card,
.doc-card,
.chat-card,
.simple-card,
.notice-card,
.user-card,
.admin-card,
.preview-card {
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.mini-stat {
  padding: 16px;
}

.mini-stat strong,
.metric-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}

.login-form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  margin: 0;
  font-size: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.login-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut-btn,
.ghost-btn,
.primary-btn,
.secondary-btn,
.tab-btn,
.nav-btn,
.action-btn {
  border-radius: 14px;
  padding: 12px 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.shortcut-btn,
.ghost-btn,
.secondary-btn,
.tab-btn,
.action-btn {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 123, 108, 0.24);
}

.secondary-btn {
  background: rgba(203, 143, 61, 0.12);
  border-color: rgba(203, 143, 61, 0.26);
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.tab-btn:hover,
.nav-btn:hover,
.action-btn:hover,
.shortcut-btn:hover {
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: #132025;
  color: #f3fbf8;
  position: sticky;
  top: 0;
  min-height: 100vh;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(145deg, #1d473f 0%, #17343c 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-logo-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 28px rgba(7, 12, 34, 0.14);
}

.brand-logo-panel img {
  display: block;
  width: 100%;
  max-height: 42px;
  object-fit: contain;
}

.brand .eyebrow {
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.14);
  color: #c8f4e8;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.brand p,
.sidebar .muted {
  color: rgba(243, 251, 248, 0.86);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.nav-btn {
  text-align: left;
  padding: 14px 16px;
  background: transparent;
  color: inherit;
  border: 1px solid transparent;
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-footer {
  margin-top: 24px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 12px;
}

.main {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.main.view-assistant {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.main.view-assistant .topbar {
  flex: 0 0 auto;
}

.main.view-home {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.main.view-home .topbar {
  flex: 0 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 22px;
}

.stack,
.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-people-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card,
.simple-card,
.notice-card,
.user-card,
.admin-card,
.preview-card,
.doc-card,
.chat-card {
  padding: 18px;
}

.metric-card .label,
.pill-row,
.doc-meta,
.row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.status-pill,
.tag,
.source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.pill,
.tag {
  background: rgba(15, 123, 108, 0.1);
  color: var(--primary-strong);
}

.status-pill {
  background: rgba(203, 143, 61, 0.14);
  color: #7a541d;
}

.status-pill.success {
  background: rgba(45, 138, 99, 0.12);
  color: var(--success);
}

.status-pill.warning {
  background: rgba(215, 137, 44, 0.15);
  color: #915e12;
}

.status-pill.danger {
  background: rgba(178, 71, 53, 0.12);
  color: var(--danger);
}

.status-pill.info {
  background: rgba(15, 123, 108, 0.1);
  color: var(--primary-strong);
}

.source-pill.private {
  background: rgba(15, 123, 108, 0.12);
  color: var(--primary-strong);
}

.source-pill.industry {
  background: rgba(203, 143, 61, 0.18);
  color: #81571a;
}

.source-pill.public {
  background: rgba(91, 107, 117, 0.14);
  color: #445057;
}

.assistant-chat-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f8fa;
}

.main.view-assistant .assistant-chat-shell {
  flex: 1 1 auto;
  height: auto;
}

.assistant-conversation-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  gap: 14px;
  padding: 10px;
  border-right: 1px solid #e4e7ec;
  background: #ffffff;
}

.assistant-new-btn {
  width: 100%;
  padding: 10px 14px;
  border-radius: 7px;
  background: #1f5ff2;
  color: #ffffff;
  font-weight: 700;
}

.assistant-conversation-list {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: auto;
}

.assistant-conversation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
  min-height: 36px;
  padding: 6px 7px 6px 12px;
  border-radius: 8px;
  background: transparent;
  color: #253044;
}

.assistant-conversation-title {
  min-width: 0;
  padding: 2px 0;
  background: transparent;
  color: inherit;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-conversation-delete {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: transparent;
  color: #7b8494;
  font-weight: 700;
}

.assistant-conversation-delete:hover {
  background: rgba(178, 71, 53, 0.12);
  color: var(--danger);
}

.assistant-conversation-item.active {
  background: #eaf2ff;
  color: #1052e8;
  font-weight: 700;
}

.assistant-clear-btn {
  padding: 9px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e4e7ec;
  color: #596579;
}

.assistant-chat-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: #f7f8fa;
}

.assistant-message-list {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 28px clamp(18px, 4vw, 58px);
}

.assistant-welcome {
  min-height: 58vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
  color: #111827;
}

.assistant-logo {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1f5ff2, #0098c9);
  color: #fff;
  font-size: 34px;
  font-weight: 800;
}

.assistant-logo::before {
  content: "AI";
  font-size: 22px;
  letter-spacing: 0;
}

.assistant-welcome h3 {
  margin: 8px 0 0;
  font-size: 20px;
}

.assistant-welcome p {
  margin: 0;
  color: #4b5563;
}

.assistant-suggestions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.assistant-message-pair {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.assistant-bubble-row {
  display: flex;
}

.assistant-bubble-row.user {
  justify-content: flex-end;
}

.assistant-bubble-row.assistant {
  justify-content: flex-start;
}

.assistant-bubble {
  max-width: min(760px, 78%);
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.assistant-bubble.user {
  background: #1f5ff2;
  color: #ffffff;
  border-color: #1f5ff2;
}

.assistant-bubble.user .small {
  color: rgba(255, 255, 255, 0.78);
}

.assistant-bubble p {
  margin: 0 0 10px;
  line-height: 1.7;
}

.assistant-bubble p:last-child {
  margin-bottom: 0;
}

.assistant-answer-text {
  margin: 12px 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.8;
  color: var(--text-soft);
}

.assistant-stream-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 10px;
  padding: 5px 10px;
  border: 1px solid rgba(95, 109, 247, 0.16);
  border-radius: 999px;
  background: rgba(239, 244, 255, 0.88);
  color: #5261d6;
  font-size: 12px;
  font-weight: 700;
}

.compact-actions .action-btn {
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 13px;
}

.assistant-attachment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.assistant-image-thumb {
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.assistant-image-thumb img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.assistant-image-thumb figcaption,
.assistant-file-chip {
  display: grid;
  gap: 3px;
  padding: 6px 8px;
  font-size: 12px;
  word-break: break-word;
}

.assistant-file-chip small {
  color: inherit;
  opacity: 0.78;
}

.assistant-composer {
  display: grid;
  gap: 8px;
  padding: 16px clamp(18px, 4vw, 58px);
  border-top: 1px solid #e4e7ec;
  background: #ffffff;
}

.assistant-input-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.assistant-input-row textarea {
  min-height: 44px;
  max-height: 150px;
  resize: vertical;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  padding: 12px 14px;
  background: #ffffff;
  color: #1f2937;
  line-height: 1.45;
}

.assistant-icon-btn,
.assistant-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.assistant-stop-btn {
  min-width: 66px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #c62828;
  font-weight: 800;
}

.assistant-icon-btn {
  background: #ffffff;
  border: 1px solid #dfe3ea;
  color: #667085;
}

.assistant-upload-icon {
  position: relative;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.assistant-upload-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.assistant-upload-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.assistant-send-btn {
  background: #7da2ff;
  color: #ffffff;
}

.assistant-send-icon {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 12px solid currentColor;
  transform: translateX(1px);
}

.assistant-composer-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assistant-image-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 13px;
}

.assistant-image-chip button {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
  line-height: 1;
}

.assistant-composer-hint {
  text-align: center;
  color: #667085;
  font-size: 12px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.question-box {
  background: linear-gradient(145deg, rgba(15, 123, 108, 0.08), rgba(255, 255, 255, 0.72));
  border-radius: 28px;
  padding: 22px;
  border: 1px solid var(--line);
}

.chat-list {
  display: grid;
  gap: 14px;
  max-height: 610px;
  overflow: auto;
  padding-right: 6px;
}

.assistant-input-panel {
  padding: 22px;
}

.assistant-input-panel .field > span {
  margin-left: 2px;
  font-weight: 700;
}

.chat-card.user {
  background: rgba(15, 123, 108, 0.08);
}

.chat-card.assistant {
  background: rgba(255, 255, 255, 0.68);
}

.chat-card h4,
.doc-card h4,
.simple-card h4,
.notice-card h4,
.admin-card h4,
.preview-card h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.doc-card {
  display: grid;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.doc-card.active {
  border-color: rgba(15, 123, 108, 0.42);
  background: rgba(15, 123, 108, 0.06);
  box-shadow: inset 4px 0 0 var(--primary);
}

.doc-actions,
.button-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button-row input {
  min-width: 220px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
}

.inline-delete {
  padding: 0 2px;
  background: transparent;
  color: var(--danger);
  font-weight: 700;
}

.department-tag-row {
  gap: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.department-tag {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  min-width: 0;
  width: 100%;
}

.department-tag > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-delete-btn {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.08);
  color: #c62828;
  font-size: 12px;
}

.department-delete-btn:hover {
  background: rgba(239, 68, 68, 0.14);
}

.department-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
}

.organization-admin-card {
  min-width: 0;
  overflow: hidden;
}

.admin-compact-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.organization-delete-form,
.organization-rename-form,
.department-delete-form,
.department-rename-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(97, 112, 247, 0.22);
}

.organization-delete-form + .organization-rename-form,
.department-delete-form + .department-rename-form {
  margin-top: 14px;
}

.admin-compact-form input,
.admin-compact-form select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(97, 112, 247, 0.13);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.admin-compact-form button,
.batch-import-label {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.department-import-card {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px dashed rgba(97, 112, 247, 0.24);
}

.org-edit-list {
  gap: 8px;
}

.org-edit-row,
.department-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(97, 112, 247, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.46);
}

.org-edit-row input,
.department-edit-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 9px 11px;
  color: var(--text);
}

.org-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.org-edit-actions button {
  width: 100%;
  justify-content: center;
}

.csv-help-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 10px;
}

.section-heading h4,
.department-import-card h4 {
  margin: 0 0 6px;
}

.button-row.tight {
  gap: 6px;
}

.mini-btn {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.bulk-user-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.bulk-user-item {
  align-items: center;
}

.bulk-user-item.selected {
  border-color: rgba(15, 123, 108, 0.34);
  background: rgba(15, 123, 108, 0.07);
}

.profile-chat-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.profile-list-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-list-header h4 {
  margin-bottom: 4px;
}

.profile-pager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.profile-scroll-list {
  align-content: start;
  grid-auto-rows: max-content;
  max-height: 608px;
  min-height: 608px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

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

.profile-favorite-list {
  display: grid;
  gap: 10px;
}

.profile-favorite-item {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.profile-favorite-item:hover {
  border-color: rgba(15, 123, 108, 0.32);
  background: rgba(15, 123, 108, 0.05);
}

.profile-chat-item {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.profile-chat-item.selected {
  border-color: rgba(15, 123, 108, 0.42);
  background: rgba(15, 123, 108, 0.07);
}

.profile-chat-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
}

.profile-chat-check input {
  margin-top: 4px;
}

.profile-chat-check span {
  display: grid;
  gap: 4px;
}

.profile-doc-mini {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.profile-item-head {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.profile-item-head strong,
.profile-doc-mini strong {
  display: block;
  line-height: 1.35;
  color: var(--text);
  word-break: break-word;
}

.profile-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.2;
}

.profile-doc-meta .tag,
.profile-doc-meta .source-pill {
  margin: 0;
  line-height: 1.15;
}

.auth-kb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.check-line input {
  margin-top: 3px;
}

.check-line span {
  display: grid;
  gap: 3px;
}

.check-line small {
  color: var(--text-soft);
}

.tab-btn.active {
  background: rgba(15, 123, 108, 0.12);
  border-color: rgba(15, 123, 108, 0.28);
  color: var(--primary-strong);
  font-weight: 700;
}

.office-tools,
.tool-panel {
  padding: 20px;
}

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-panel {
  display: grid;
  gap: 18px;
}

.office-textarea {
  min-height: 280px;
  font-family: Consolas, "Courier New", monospace;
}

.office-output-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.office-output-preview pre {
  max-height: 300px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: #f7f9fc;
  white-space: pre-wrap;
  word-break: break-word;
  font: 13px/1.65 Consolas, "Courier New", monospace;
}

.translate-tool {
  gap: 18px;
}

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

.translate-quota-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.translate-quota-card span,
.translate-quota-card small {
  color: #667085;
  font-size: 12px;
}

.translate-quota-card strong {
  color: #1d2437;
  font-size: 20px;
}

.quota-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(95, 109, 247, 0.12);
}

.quota-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f7a68, #626cf6);
}

.compact-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.office-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
}

.office-preview-stage {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(95, 109, 247, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(45deg, rgba(236, 241, 255, 0.65) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(236, 241, 255, 0.65) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(236, 241, 255, 0.65) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(236, 241, 255, 0.65) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  cursor: crosshair;
}

.office-preview-image {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  user-select: none;
  pointer-events: none;
}

.office-image-frame {
  position: relative;
  max-width: 100%;
  max-height: 68vh;
}

.office-image-frame .office-preview-image {
  max-height: 68vh;
}

.office-selection-box {
  position: absolute;
  border: 2px solid #4e6bff;
  background: rgba(78, 107, 255, 0.15);
  box-shadow: 0 0 0 9999px rgba(15, 22, 38, 0.25);
  pointer-events: none;
}

.office-selection-box.mosaic {
  border-color: #ef5d68;
  background:
    repeating-linear-gradient(45deg, rgba(239, 93, 104, 0.2) 0 8px, rgba(239, 93, 104, 0.34) 8px 16px);
}

.office-selection-info {
  display: grid;
  align-content: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.office-selection-stats {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
}

.office-control-grid input[type="range"],
.office-selection-info input[type="range"] {
  width: 100%;
}

.office-image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.office-thumb,
.office-stitch-item {
  margin: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.office-thumb img,
.office-stitch-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: #f7f9fc;
}

.office-thumb figcaption,
.office-stitch-item figcaption {
  display: grid;
  gap: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.office-stitch-preview {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
}

.office-stitch-preview.vertical {
  flex-direction: column;
}

.office-stitch-preview.horizontal {
  flex-direction: row;
}

.office-stitch-item {
  position: relative;
  min-width: 180px;
}

.office-stitch-item > span {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #4e6bff;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

button:disabled,
.primary-btn:disabled,
.secondary-btn:disabled,
.ghost-btn:disabled,
.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.filter-panel,
.upload-panel,
.form-panel,
.table-panel,
.helper-panel {
  padding: 20px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
}

.dropzone {
  border: 2px dashed rgba(15, 123, 108, 0.24);
  border-radius: 24px;
  padding: 28px;
  text-align: center;
  background: rgba(15, 123, 108, 0.05);
}

.queue-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: rgba(24, 35, 42, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.knowledge-sidebar {
  padding: 18px;
  position: sticky;
  top: 24px;
}

.knowledge-sidebar h4,
.form-panel h4 {
  margin: 0 0 6px;
}

.kb-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: calc(100vh - 190px);
  overflow: auto;
  padding-right: 4px;
}

.kb-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.56);
}

.kb-card.active {
  border-color: rgba(15, 123, 108, 0.42);
  box-shadow: inset 4px 0 0 var(--primary);
}

.kb-card-main {
  display: grid;
  gap: 2px;
  padding: 0;
  text-align: left;
  color: inherit;
  background: transparent;
}

.kb-card-main strong {
  font-size: 15px;
  line-height: 1.25;
}

.kb-card .small,
.kb-card .status-pill {
  font-size: 11px;
}

.kb-card .status-pill {
  padding: 4px 8px;
}

.kb-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.kb-actions .action-btn {
  width: 100%;
  padding: 7px 0;
  border-radius: 10px;
  font-size: 13px;
}

.kb-detail-actions {
  align-items: center;
}

.kb-back-btn {
  margin: 0 0 10px;
  padding: 8px 12px;
}

.kb-detail-actions .primary-btn,
.kb-detail-actions .secondary-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 13px;
  font-size: 14px;
}

.kb-sort-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.kb-sort-actions .action-btn {
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.68);
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
}

.stat-bar {
  display: grid;
  gap: 10px;
}

.stat-bar-item {
  display: grid;
  grid-template-columns: 128px 1fr auto;
  gap: 12px;
  align-items: center;
}

.bar-track {
  height: 10px;
  background: rgba(24, 35, 42, 0.08);
  border-radius: 999px;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), #dfa95c);
}

.notice-card.success {
  border-left: 4px solid var(--success);
}

.notice-card.info {
  border-left: 4px solid var(--primary);
}

.notice-card.warning {
  border-left: 4px solid var(--warning);
}

.danger-text {
  color: var(--danger);
}

.small {
  font-size: 13px;
  color: var(--text-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(12, 20, 24, 0.48);
}

.doc-preview-modal {
  width: min(920px, 100%);
  max-height: min(82vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 18px;
  background: #fffaf3;
  box-shadow: 0 24px 70px rgba(12, 20, 24, 0.28);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 10px 0;
  font-size: 22px;
  line-height: 1.35;
}

.modal-close {
  flex: 0 0 auto;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.doc-preview-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 14px/1.8 "Microsoft YaHei UI", "Segoe UI", sans-serif;
  color: var(--text);
}

.compact-modal {
  width: min(720px, 100%);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.timeline-item > span {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(38, 131, 118, 0.12);
}

.timeline-item > div {
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}

.hidden-mobile {
  display: initial;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .page-grid,
  .split,
  .knowledge-layout,
  .knowledge-layout.overview-mode,
  .knowledge-management-grid,
  .assistant-chat-shell,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .assistant-conversation-panel {
    grid-template-rows: auto auto auto;
    border-right: 0;
    border-bottom: 1px solid #e4e7ec;
  }

  .assistant-conversation-list {
    display: flex;
    overflow-x: auto;
  }

  .assistant-conversation-item {
    flex: 0 0 auto;
    max-width: 220px;
  }

  .knowledge-sidebar {
    position: static;
  }

  .kb-list {
    max-height: none;
  }

  .kb-filter-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main,
  .login-shell {
    padding: 16px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .auth-kb-grid,
  .login-shortcuts {
    grid-template-columns: 1fr;
  }

  .admin-people-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .profile-chat-header {
    flex-direction: column;
  }

  .hidden-mobile {
    display: none;
  }

  .stat-bar-item {
    grid-template-columns: 1fr;
  }

  .main.view-assistant {
    height: 100dvh;
    max-height: 100dvh;
    padding: 12px;
    gap: 12px;
  }

  .assistant-chat-shell {
    min-height: 0;
  }

  .assistant-message-list {
    padding: 18px 12px;
  }

  .assistant-bubble {
    max-width: 94%;
  }

  .assistant-composer {
    padding: 12px;
  }

  .assistant-input-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .assistant-icon-btn,
  .assistant-send-btn {
    width: 40px;
    height: 40px;
  }

  .modal-backdrop {
    padding: 14px;
  }

  .modal-header {
    flex-direction: column;
  }

  .modal-close {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .login-panel {
    width: min(520px, 100%);
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .login-hero {
    display: none;
  }
}

@media (max-width: 720px) {
  .login-shell {
    align-items: center;
    padding: 86px 14px 18px;
  }

  .login-brand-logo {
    top: 18px;
    left: 16px;
    width: min(420px, calc(100vw - 32px));
    max-height: 58px;
    padding: 9px 12px;
    border-radius: 14px;
  }

  .login-panel {
    gap: 0;
    border-radius: 24px;
  }

  .login-form {
    border-radius: 24px;
    padding: 28px 22px;
  }

  .login-form #login-form .button-row {
    grid-template-columns: 1fr;
  }
}

/* 2026 UI redesign: glass login + clean business dashboard */
:root {
  --bg: #eef3fb;
  --bg-strong: #dde8f8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-dark: #10132d;
  --text: #202638;
  --text-soft: #667085;
  --line: rgba(91, 99, 246, 0.12);
  --line-strong: rgba(25, 31, 58, 0.14);
  --primary: #5f6df7;
  --primary-strong: #7357ec;
  --accent: #38a7ff;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #12a87a;
  --shadow: 0 22px 60px rgba(29, 42, 91, 0.12);
  --shadow-soft: 0 12px 34px rgba(29, 42, 91, 0.08);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

html,
body {
  background:
    linear-gradient(115deg, rgba(235, 244, 255, 0.96) 0%, rgba(244, 247, 255, 0.98) 46%, rgba(238, 243, 251, 1) 100%);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  display: none;
}

#app {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(95, 109, 247, 0.22);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: rgba(227, 234, 247, 0.7);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: rgba(111, 123, 248, 0.38);
  border-radius: 999px;
}

.card,
.panel,
.metric-card,
.doc-card,
.chat-card,
.simple-card,
.notice-card,
.user-card,
.admin-card,
.preview-card,
.filter-panel,
.upload-panel,
.form-panel,
.table-panel,
.helper-panel,
.office-tools,
.tool-panel,
.knowledge-sidebar {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.login-shell {
  position: relative;
  min-height: 100vh;
  padding: clamp(26px, 4vw, 56px);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(15, 25, 55, 0.28), rgba(78, 105, 247, 0.12) 44%, rgba(255, 255, 255, 0.18)),
    linear-gradient(160deg, #102044, #243c66 48%, #121a31);
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 20, 46, 0.24), rgba(255, 255, 255, 0.06)),
    rgba(244, 248, 255, 0.12);
}

.login-shell::after {
  content: none;
}

.login-brand-logo {
  position: absolute;
  z-index: 2;
  top: clamp(22px, 3.2vw, 42px);
  left: clamp(28px, 4vw, 58px);
  width: clamp(360px, 34vw, 680px);
  max-height: 76px;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.2vw, 22px);
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(17, 28, 64, 0.14);
  backdrop-filter: blur(16px);
}

.login-brand-mark {
  width: clamp(46px, 4.2vw, 74px);
  height: clamp(46px, 4.2vw, 74px);
  object-fit: cover;
  flex: 0 0 auto;
}

.login-brand-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  color: #264895;
  line-height: 1;
}

.login-brand-text strong {
  display: block;
  font-size: clamp(28px, 3.4vw, 58px);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.login-brand-text span {
  display: block;
  font-size: clamp(8px, 0.72vw, 14px);
  font-weight: 600;
  letter-spacing: clamp(1.6px, 0.22vw, 3.7px);
  white-space: nowrap;
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.86fr);
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 28px 90px rgba(17, 28, 64, 0.24);
  backdrop-filter: blur(20px);
}

.login-hero {
  min-height: 520px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(67, 145, 255, 0.84), rgba(111, 82, 238, 0.84)),
    rgba(95, 109, 247, 0.82);
  box-shadow: none;
}

.login-hero::after {
  content: none;
}

.login-form {
  position: relative;
  justify-content: center;
  padding: clamp(34px, 4.2vw, 54px);
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  backdrop-filter: none;
}

.login-form::before {
  content: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 68px;
  height: 68px;
  border-top-right-radius: 28px;
  background: linear-gradient(135deg, transparent 50%, #6573f7 51%);
}

.login-form .section-title {
  text-align: center;
  font-size: 32px;
  color: #17203a;
}

.login-form #login-form .button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(130px, 0.72fr);
  align-items: stretch;
  gap: 12px;
}

.login-form #login-form .button-row > button {
  width: 100%;
}

.register-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.register-actions {
  align-items: center;
}

.register-actions .primary-btn {
  min-width: 128px;
}

.field {
  gap: 9px;
}

.field > span,
.table th,
.metric-card .label {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.button-row input,
.assistant-input-row textarea {
  border: 1px solid rgba(97, 112, 247, 0.13);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 14px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field input,
.field select,
.button-row input {
  min-height: 44px;
}

.field input::placeholder,
.field textarea::placeholder,
.assistant-input-row textarea::placeholder {
  color: #a1acc0;
}

.setting-field {
  padding: 12px;
  border: 1px dashed rgba(97, 112, 247, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.setting-field small {
  color: #7a869a;
  font-size: 12px;
  line-height: 1.55;
}

.move-doc-summary {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.move-doc-summary small {
  color: #7a869a;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.shortcut-btn,
.tab-btn,
.nav-btn,
.action-btn {
  min-height: 38px;
  border-radius: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #4ea1ff 0%, #646df7 54%, #8658e8 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 16px 32px rgba(95, 109, 247, 0.28);
}

.secondary-btn,
.ghost-btn,
.shortcut-btn,
.tab-btn,
.action-btn {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(95, 109, 247, 0.14);
  color: #344054;
}

.secondary-btn {
  background: rgba(238, 243, 255, 0.92);
  color: #4d5fe4;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.tab-btn:hover,
.action-btn:hover,
.shortcut-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(50, 65, 139, 0.12);
}

.app-shell {
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, #10132d 0 276px, transparent 276px),
    #eef3fb;
}

.sidebar {
  min-height: 100vh;
  padding: 28px 18px;
  color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(180deg, #11132d 0%, #171b3d 58%, #10132d 100%);
  border-right: 0;
  box-shadow: 12px 0 34px rgba(20, 24, 58, 0.18);
}

.brand {
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(83, 100, 230, 0.12)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 32px rgba(5, 9, 30, 0.18);
}

.brand-logo-panel {
  height: 70px;
  padding: 6px 8px;
  border-radius: 16px;
  background: #ffffff;
}

.brand-logo-panel img {
  max-height: 58px;
}

.brand .eyebrow {
  max-width: 100%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
}

.brand h1 {
  color: #fff;
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  text-shadow: none;
  text-align: center;
  letter-spacing: 0;
}

.brand p,
.sidebar .muted {
  color: rgba(235, 241, 255, 0.68);
}

.nav {
  gap: 10px;
  margin-top: 28px;
}

.nav-btn {
  min-height: 48px;
  padding: 13px 16px;
  border-radius: 16px;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #5968f4, #7d5bf1);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 16px 30px rgba(62, 80, 205, 0.26);
}

.sidebar-footer {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.main {
  min-width: 0;
  padding: 28px clamp(24px, 3vw, 36px);
  gap: 22px;
  background:
    linear-gradient(180deg, rgba(245, 248, 255, 0.96), rgba(238, 243, 251, 1));
}

.topbar {
  min-height: 82px;
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.topbar h2 {
  margin: 0 0 4px;
  color: #17203a;
  font-size: 25px;
}

.topbar .muted {
  color: #69758a;
}

.page-grid {
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.82fr);
  gap: 20px;
}

.stack,
.grid-2,
.grid-3,
.grid-4 {
  gap: 16px;
}

.metric-card,
.simple-card,
.notice-card,
.user-card,
.admin-card,
.preview-card,
.doc-card,
.chat-card,
.filter-panel,
.upload-panel,
.form-panel,
.table-panel,
.helper-panel,
.office-tools,
.tool-panel {
  padding: 18px;
}

.metric-card {
  min-height: 128px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 255, 0.92));
}

.metric-card strong,
.mini-stat strong {
  color: #17203a;
  font-weight: 800;
}

.simple-card h4,
.notice-card h4,
.admin-card h4,
.preview-card h4,
.doc-card h4,
.chat-card h4 {
  color: #1d2437;
  font-size: 17px;
}

.pill,
.tag,
.source-pill {
  background: rgba(95, 109, 247, 0.1);
  color: #4d5fe4;
  border: 1px solid rgba(95, 109, 247, 0.1);
}

.status-pill {
  background: rgba(245, 158, 11, 0.12);
  color: #a05a00;
}

.status-pill.success {
  background: rgba(18, 168, 122, 0.12);
  color: #087f5f;
}

.status-pill.warning {
  background: rgba(245, 158, 11, 0.14);
  color: #9a5c00;
}

.status-pill.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #c62828;
}

.source-pill.private {
  background: rgba(95, 109, 247, 0.12);
  color: #4d5fe4;
}

.source-pill.industry {
  background: rgba(56, 167, 255, 0.12);
  color: #116eac;
}

.source-pill.public {
  background: rgba(18, 168, 122, 0.12);
  color: #087f5f;
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(95, 109, 247, 0.15), rgba(56, 167, 255, 0.12));
  border-color: rgba(95, 109, 247, 0.28);
  color: #4d5fe4;
}

.question-box {
  background: linear-gradient(145deg, rgba(232, 239, 255, 0.92), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 24px;
}

.table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.user-list-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(97, 112, 247, 0.22);
}

.user-list-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.6fr) minmax(150px, 0.6fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.user-list-toolbar input,
.user-list-toolbar select {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 9px 12px;
  color: var(--text);
}

.user-list-toolbar .status-pill {
  justify-self: end;
  white-space: nowrap;
}

.user-table-scroll {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.user-table {
  width: 100%;
}

.user-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.table th,
.table td {
  border-bottom: 0;
}

.table tbody tr {
  background: rgba(248, 250, 255, 0.78);
  box-shadow: inset 0 0 0 1px rgba(95, 109, 247, 0.06);
}

.table tbody td:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.table tbody td:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.dropzone {
  border-color: rgba(95, 109, 247, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(241, 245, 255, 0.9), rgba(255, 255, 255, 0.8));
}

.upload-main-stack {
  align-content: start;
}

.upload-panel {
  display: grid;
  gap: 14px;
  align-self: start;
}

.upload-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.upload-card-head h4,
.upload-card-head p {
  margin: 0;
}

.upload-panel .dropzone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  text-align: left;
}

.upload-panel .dropzone h4,
.upload-panel .dropzone p {
  margin: 0;
}

.upload-panel .dropzone p {
  margin-top: 5px;
  line-height: 1.55;
}

.upload-drop-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38a7ff, #646df7 56%, #8658e8);
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  box-shadow: 0 16px 28px rgba(95, 109, 247, 0.22);
}

.upload-drop-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

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

.upload-quick-stats div {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(95, 109, 247, 0.11);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.upload-quick-stats strong {
  color: #17203a;
  font-size: 20px;
  line-height: 1.1;
}

.upload-quick-stats span {
  color: var(--text-soft);
  font-size: 12px;
}

.upload-quick-stats .danger strong {
  color: var(--danger);
}

.progress {
  background: rgba(95, 109, 247, 0.1);
}

.progress span,
.bar-track span {
  background: linear-gradient(135deg, #38a7ff, #646df7 56%, #8658e8);
}

.knowledge-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
}

.knowledge-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.knowledge-sidebar {
  position: static;
  top: auto;
  padding: 16px;
}

.knowledge-sidebar > .row {
  align-items: flex-start;
}

.kb-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 320px);
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.kb-group-heading {
  display: grid;
  align-content: center;
  gap: 2px;
  margin: 8px 2px 0 0;
  padding: 10px 12px;
  border-top: 1px dashed rgba(95, 109, 247, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  color: #344054;
}

.kb-group-heading:first-child {
  margin-top: 0;
  border-top: 0;
}

.kb-group-heading span {
  font-size: 13px;
  font-weight: 800;
}

.kb-group-heading small {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.kb-card {
  gap: 7px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(95, 109, 247, 0.1);
  box-shadow: 0 10px 24px rgba(28, 42, 92, 0.05);
  position: relative;
}

.kb-card[data-kb-sortable="true"] {
  padding-right: 46px;
}

.kb-drag-handle {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(95, 109, 247, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #667085;
  cursor: grab;
  touch-action: none;
}

.kb-drag-handle::before {
  content: "";
  width: 14px;
  height: 14px;
  background-image: radial-gradient(circle, currentColor 1.4px, transparent 1.6px);
  background-size: 7px 7px;
}

.kb-drag-handle:active {
  cursor: grabbing;
}

.kb-list.drag-active {
  user-select: none;
  cursor: grabbing;
}

.kb-list.drag-active .kb-card {
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.kb-list.drag-active .kb-card:not(.dragging) {
  opacity: 0.72;
}

.kb-drag-placeholder {
  border: 1.5px dashed rgba(95, 109, 247, 0.38);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(238, 243, 255, 0.72), rgba(255, 255, 255, 0.54));
  box-shadow: inset 0 0 0 1px rgba(95, 109, 247, 0.08);
  transition: height 0.16s ease, transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.kb-card.active {
  border-color: rgba(95, 109, 247, 0.36);
  background: linear-gradient(145deg, rgba(238, 243, 255, 0.98), rgba(255, 255, 255, 0.88));
  box-shadow:
    inset 4px 0 0 #626cf6,
    0 12px 26px rgba(71, 82, 192, 0.12);
}

.kb-card.dragging,
.kb-card.active.dragging {
  border-color: rgba(95, 109, 247, 0.72);
  background: linear-gradient(145deg, #ffffff, #eef3ff);
  box-shadow:
    inset 4px 0 0 #626cf6,
    0 22px 44px rgba(71, 82, 192, 0.28);
  opacity: 1;
  transition: box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
  transform-origin: top left;
  will-change: transform;
  z-index: 5;
}

.kb-card.dragging::after {
  content: "拖动中";
  position: absolute;
  top: -10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #626cf6;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(71, 82, 192, 0.22);
}

.kb-card.dragging .kb-drag-handle {
  border-color: rgba(95, 109, 247, 0.54);
  background: #626cf6;
  color: #ffffff;
  cursor: grabbing;
  box-shadow: 0 8px 18px rgba(71, 82, 192, 0.18);
}

.kb-card-main strong {
  color: #1d2437;
}

.custom-visibility-picker {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px dashed rgba(95, 109, 247, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
}

.custom-visibility-picker > div {
  display: grid;
  gap: 8px;
}

.custom-visibility-picker strong {
  color: #344054;
  font-size: 13px;
}

.custom-visibility-picker .auth-kb-grid {
  max-height: 150px;
  overflow: auto;
  padding-right: 4px;
}

.doc-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.doc-card-title span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.kb-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.kb-actions .action-btn,
.compact-actions .action-btn {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.kb-detail-actions .primary-btn,
.kb-detail-actions .secondary-btn {
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 13px;
  font-size: 14px;
}

.kb-sort-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.kb-sort-actions .action-btn {
  min-height: 24px;
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-drawer-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-drawer-tab {
  display: grid;
  gap: 6px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #344054;
  text-align: left;
  box-shadow: 0 10px 24px rgba(28, 42, 92, 0.05);
}

.admin-drawer-tab strong {
  color: #1d2437;
  font-size: 16px;
}

.admin-drawer-tab span {
  color: #667085;
  font-size: 13px;
}

.admin-drawer-tab.active {
  border-color: rgba(95, 109, 247, 0.36);
  background: linear-gradient(145deg, rgba(238, 243, 255, 0.98), rgba(255, 255, 255, 0.9));
  box-shadow:
    inset 4px 0 0 #626cf6,
    0 16px 30px rgba(71, 82, 192, 0.12);
}

.admin-drawer-panel {
  display: grid;
  gap: 16px;
}

.document-list-panel {
  min-height: 0;
}

.document-list-scroll {
  display: grid;
  gap: 12px;
  max-height: min(720px, calc(100vh - 390px));
  min-height: 220px;
  overflow: auto;
  padding: 2px 6px 2px 0;
  overscroll-behavior: contain;
}

.knowledge-doc-pager {
  margin-top: 4px;
}

.doc-card {
  gap: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.doc-card:hover,
.profile-chat-item:hover,
.profile-favorite-item:hover {
  border-color: rgba(95, 109, 247, 0.24);
  box-shadow: 0 14px 30px rgba(29, 42, 91, 0.1);
}

.doc-card.active {
  border-color: rgba(95, 109, 247, 0.38);
  background: rgba(239, 244, 255, 0.92);
  box-shadow:
    inset 4px 0 0 #626cf6,
    0 14px 30px rgba(71, 82, 192, 0.12);
}

.doc-card.selected {
  border-color: rgba(15, 123, 108, 0.32);
  background: rgba(15, 123, 108, 0.05);
}

.doc-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.doc-select-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(95, 109, 247, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.doc-select-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.doc-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px dashed rgba(95, 109, 247, 0.2);
  border-radius: 16px;
  background: rgba(247, 249, 255, 0.86);
}

.recycle-bulk-bar {
  margin: 12px 0;
  align-items: flex-start;
}

.inline-check {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-width: 0;
}

.inline-check input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.inline-check strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recycle-doc-card.selected,
.approval-card.selected {
  border-color: rgba(95, 109, 247, 0.32);
  background: rgba(239, 244, 255, 0.92);
}

.deletion-approval-list {
  max-height: min(620px, calc(100vh - 330px));
  overflow: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.assistant-chat-shell {
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 0;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.main.view-assistant {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.main.view-assistant .assistant-chat-shell {
  flex: 1 1 auto;
}

.assistant-conversation-panel {
  padding: 14px;
  gap: 12px;
  border-right: 1px solid rgba(95, 109, 247, 0.1);
  background: linear-gradient(180deg, rgba(250, 252, 255, 0.96), rgba(238, 243, 255, 0.9));
}

.assistant-new-btn {
  min-height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4ea1ff, #646df7 58%, #8658e8);
  box-shadow: 0 14px 28px rgba(95, 109, 247, 0.24);
}

.assistant-conversation-list {
  gap: 8px;
}

.assistant-conversation-item {
  min-height: 42px;
  padding: 7px 8px 7px 12px;
  border-radius: 14px;
  color: #475467;
}

.assistant-conversation-item.active {
  background: #ffffff;
  color: #4d5fe4;
  box-shadow: 0 10px 22px rgba(29, 42, 91, 0.08);
}

.assistant-conversation-delete {
  border-radius: 9px;
}

.assistant-clear-btn {
  min-height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(95, 109, 247, 0.12);
}

.assistant-chat-main {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(243, 247, 255, 0.98));
}

.assistant-message-list {
  padding: 30px clamp(22px, 4vw, 64px);
}

.assistant-logo {
  width: 70px;
  height: 70px;
  border-radius: 22px;
  background: linear-gradient(135deg, #38a7ff, #646df7 56%, #8658e8);
  box-shadow: 0 18px 36px rgba(95, 109, 247, 0.22);
}

.assistant-welcome h3 {
  color: #17203a;
  font-size: 22px;
}

.assistant-welcome p {
  color: #69758a;
}

.assistant-bubble {
  max-width: min(790px, 80%);
  padding: 15px 17px;
  border-color: rgba(95, 109, 247, 0.1);
  border-radius: 18px 18px 18px 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(29, 42, 91, 0.08);
}

.assistant-bubble.user {
  border-color: transparent;
  border-radius: 18px 18px 8px 18px;
  background: linear-gradient(135deg, #4ea1ff, #626cf6 58%, #7d5bf1);
}

.assistant-answer-text {
  color: #354052;
  line-height: 1.9;
}

.assistant-reasoning {
  margin: 12px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 14px;
  background: rgba(245, 248, 255, 0.9);
  color: #526071;
}

.assistant-reasoning summary {
  cursor: pointer;
  color: #4d5fe4;
  font-weight: 800;
}

.assistant-reasoning pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  line-height: 1.7;
}

.assistant-reasoning.pending {
  display: flex;
  gap: 10px;
  align-items: center;
}

.thinking-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #626cf6;
  box-shadow: 0 0 0 0 rgba(98, 108, 246, 0.42);
  animation: thinkingPulse 1.2s infinite;
}

@keyframes thinkingPulse {
  70% {
    box-shadow: 0 0 0 10px rgba(98, 108, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(98, 108, 246, 0);
  }
}

.reference-detail-btn {
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

.batch-import-label {
  width: 100%;
  text-align: center;
}

.department-import-card {
  margin-top: 16px;
}

.assistant-composer {
  padding: 16px clamp(22px, 4vw, 64px);
  border-top: 1px solid rgba(95, 109, 247, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.assistant-input-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: end;
}

.assistant-input-row textarea {
  min-height: 48px;
  border-radius: 16px;
}

.assistant-icon-btn,
.assistant-send-btn {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.assistant-stop-btn {
  height: 46px;
  border-radius: 16px;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.12);
}

.assistant-icon-btn {
  background: #f5f8ff;
  border-color: rgba(95, 109, 247, 0.14);
  color: #5966e8;
}

.assistant-send-btn {
  background: linear-gradient(135deg, #4ea1ff, #646df7);
  box-shadow: 0 12px 24px rgba(95, 109, 247, 0.24);
}

.assistant-image-chip {
  background: rgba(238, 243, 255, 0.96);
  color: #4d5fe4;
}

.profile-chat-list,
.profile-favorite-list {
  gap: 10px;
}

.profile-scroll-list {
  min-height: 560px;
  max-height: 560px;
  align-content: start;
  grid-auto-rows: max-content;
}

.profile-chat-item,
.profile-favorite-item,
.check-line {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(95, 109, 247, 0.1);
}

.profile-chat-item.selected {
  border-color: rgba(95, 109, 247, 0.36);
  background: rgba(239, 244, 255, 0.94);
}

.auth-kb-grid {
  gap: 10px;
}

.notice-card.success,
.notice-card.info,
.notice-card.warning {
  border-left-width: 0;
}

.notice-card.success {
  box-shadow: inset 4px 0 0 var(--success), var(--shadow-soft);
}

.notice-card.info {
  box-shadow: inset 4px 0 0 var(--primary), var(--shadow-soft);
}

.notice-card.warning {
  box-shadow: inset 4px 0 0 var(--warning), var(--shadow-soft);
}

.empty {
  border-color: rgba(95, 109, 247, 0.18);
  background: rgba(255, 255, 255, 0.58);
}

.modal-backdrop {
  background: rgba(16, 19, 45, 0.54);
  backdrop-filter: blur(8px);
}

.doc-preview-modal {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(16, 19, 45, 0.28);
}

.modal-header {
  border-bottom-color: rgba(95, 109, 247, 0.12);
}

.doc-preview-content {
  color: #2c3446;
}

.confirm-modal-backdrop {
  z-index: 60;
}

.confirm-modal {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 90px rgba(16, 19, 45, 0.28);
  backdrop-filter: blur(18px);
}

.confirm-modal h3 {
  margin: 0;
  color: #17203a;
  font-size: 21px;
}

.confirm-modal p {
  margin: 0;
  color: #4f5b70;
  line-height: 1.75;
  white-space: pre-wrap;
}

.confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.confirm-actions button {
  width: 100%;
}

.danger-confirm {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.18);
  color: #c62828;
}

.danger-action {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #c62828;
}

.danger-action:hover {
  background: rgba(239, 68, 68, 0.13);
}

.small,
.muted {
  color: var(--text-soft);
}

.danger-text {
  color: var(--danger);
}

.reset-scope-modal {
  max-width: 560px;
}

.reset-scope-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.reset-scope-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.reset-scope-item input {
  margin-top: 3px;
}

.reset-scope-item strong,
.reset-scope-item small {
  display: block;
}

.reset-scope-item strong {
  color: var(--text);
  font-size: 13px;
}

.reset-scope-item small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.reset-scope-utility {
  justify-content: flex-start;
}

.kb-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 180px) minmax(150px, 180px);
  gap: 8px;
  margin: 12px 0 10px;
}

.knowledge-management-grid .kb-filter-bar {
  grid-template-columns: minmax(0, 1fr);
}

.kb-filter-bar input,
.kb-filter-bar select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  padding: 8px 11px;
  color: var(--text);
}

.kb-sort-status {
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px dashed rgba(15, 123, 108, 0.28);
  border-radius: 12px;
  background: rgba(15, 123, 108, 0.06);
  color: #0f7b6c;
  font-size: 12px;
  font-weight: 700;
}

.assistant-reference-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(95, 109, 247, 0.22);
}

.assistant-reference-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.assistant-reference-list {
  display: grid;
  gap: 8px;
}

.assistant-reference-card {
  padding: 10px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 12px;
  background: rgba(248, 250, 255, 0.86);
}

.assistant-reference-card p {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.assistant-reference-title {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.assistant-reference-title span {
  color: #626cf6;
  font-size: 12px;
  font-weight: 700;
}

.assistant-reference-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-reference-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pager-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(95, 109, 247, 0.16);
}

.segmented-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 12px;
  background: rgba(245, 247, 255, 0.86);
}

.segmented-tabs button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.segmented-tabs button.active {
  background: #ffffff;
  color: #626cf6;
  box-shadow: 0 8px 18px rgba(71, 82, 192, 0.12);
}

.admin-management-tabs {
  margin: 10px 0 14px;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.department-admin-content {
  min-width: 0;
}

.department-admin-content .organization-admin-card,
.department-admin-content .bulk-auth-card {
  width: 100%;
}

.upload-learning-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.upload-learning-summary > div {
  padding: 10px;
  border: 1px solid rgba(95, 109, 247, 0.1);
  border-radius: 12px;
  background: rgba(248, 250, 255, 0.84);
}

.upload-learning-summary strong,
.upload-learning-summary span {
  display: block;
}

.upload-learning-summary strong {
  font-size: 18px;
  color: var(--text);
}

.upload-learning-summary span {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 12px;
}

.upload-learning-summary .danger strong {
  color: var(--danger);
}

.version-log-card {
  margin-top: 16px;
}

.paged-card {
  display: grid;
  gap: 12px;
}

.notice-center-list,
.version-log-list {
  display: grid;
  gap: 10px;
  max-height: min(430px, calc(100vh - 340px));
  overflow: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.notice-center-list {
  max-height: min(520px, calc(100vh - 300px));
}

.compact-admin-card {
  align-self: start;
  padding: 16px;
}

.operation-log-head {
  display: grid;
  grid-template-columns: minmax(160px, 0.7fr) minmax(220px, 1fr);
  gap: 12px;
}

.operation-log-head h4,
.operation-log-head p {
  margin: 0;
}

.operation-log-head input {
  min-height: 38px;
  padding: 9px 12px;
}

.operation-log-table-scroll {
  max-height: min(440px, calc(100vh - 360px));
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.operation-log-table {
  table-layout: fixed;
}

.operation-log-table th,
.operation-log-table td {
  padding: 8px 9px;
  font-size: 13px;
  line-height: 1.38;
  word-break: break-word;
}

.operation-log-table th:nth-child(1),
.operation-log-table td:nth-child(1) {
  width: 120px;
}

.operation-log-table th:nth-child(2),
.operation-log-table td:nth-child(2) {
  width: 82px;
}

.operation-log-table th:nth-child(3),
.operation-log-table td:nth-child(3) {
  width: 92px;
}

.notice-center-card {
  gap: 10px;
}

.notice-center-card .notice-center-list {
  gap: 8px;
  max-height: min(430px, calc(100vh - 360px));
}

.notice-center-card .notice-card {
  display: grid;
  gap: 5px;
  padding: 11px 13px;
  border-radius: 14px;
}

.notice-center-card .notice-card h4 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
}

.notice-center-card .notice-card p {
  margin: 0;
  line-height: 1.45;
}

.version-log-item {
  display: grid;
  grid-template-columns: minmax(100px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(95, 109, 247, 0.1);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.version-log-item ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    background: #eef3fb;
  }

  .sidebar {
    position: static;
    min-height: auto;
    border-radius: 0 0 28px 28px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .page-grid,
  .split,
  .knowledge-layout,
  .knowledge-management-grid,
  .assistant-chat-shell,
  .department-admin-grid,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .admin-people-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

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

  .kb-list {
    display: grid;
    overflow: visible;
    padding-right: 0;
  }

  .kb-card,
  .kb-group-heading {
    flex-basis: auto;
  }

  .kb-group-heading {
    border-left: 0;
    border-top: 1px dashed rgba(95, 109, 247, 0.22);
  }

  .reset-scope-list {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: auto;
  }

  .assistant-conversation-panel {
    grid-template-rows: auto auto auto;
    border-right: 0;
    border-bottom: 1px solid rgba(95, 109, 247, 0.1);
  }

  .assistant-conversation-list {
    display: flex;
    overflow-x: auto;
  }

  .assistant-conversation-item {
    flex: 0 0 auto;
    max-width: 230px;
  }
}

@media (max-width: 720px) {
  .main,
  .login-shell {
    padding: 14px;
  }

  .login-panel {
    gap: 16px;
  }

  .kb-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-hero,
  .login-form,
  .topbar,
  .assistant-chat-shell {
    border-radius: 22px;
  }

  .hero-title {
    font-size: 36px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .topbar {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .admin-drawer-tabs,
  .auth-kb-grid,
  .upload-panel .dropzone,
  .upload-learning-summary,
  .upload-quick-stats,
  .bulk-user-list,
  .org-edit-row,
  .department-edit-row,
  .department-tag-row,
  .register-grid,
  .login-shortcuts {
    grid-template-columns: 1fr;
  }

  .assistant-reference-heading,
  .version-log-item {
    grid-template-columns: 1fr;
  }

  .profile-drawer-layout,
  .profile-account-hero,
  .profile-account-facts,
  .profile-default-grid {
    grid-template-columns: 1fr;
  }

  .profile-drawer-tabs {
    position: static;
  }

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

  .profile-security-row .ghost-btn {
    width: 100%;
  }

  .profile-content-grid-drawer .profile-scroll-list {
    min-height: 300px;
    max-height: 300px;
  }

  .assistant-reference-heading {
    display: grid;
  }

  .login-form #login-form .button-row {
    grid-template-columns: 1fr;
  }

  .main.view-assistant {
    height: 100dvh;
    max-height: 100dvh;
    padding: 10px;
    gap: 10px;
  }

  .main.view-assistant .topbar {
    display: none;
  }

  .assistant-chat-shell {
    min-height: 0;
  }

  .assistant-message-list {
    padding: 18px 12px;
  }

  .assistant-bubble {
    max-width: 94%;
  }

  .assistant-composer {
    padding: 12px;
  }

  .assistant-input-row {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .assistant-icon-btn,
  .assistant-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .assistant-stop-btn {
    min-width: 58px;
    height: 40px;
    padding: 0 10px;
    border-radius: 13px;
  }

  .modal-backdrop {
    padding: 14px;
  }

  .modal-header {
    flex-direction: column;
  }

  .modal-close {
    width: 100%;
  }
}

.topbar {
  position: relative;
  z-index: 8;
}

.topbar-actions {
  position: relative;
  flex-wrap: nowrap;
}

.topbar-user-menu {
  position: relative;
  min-width: 210px;
}

.topbar-user-menu summary {
  list-style: none;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 7px 10px 7px 8px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 30px rgba(29, 42, 91, 0.08);
  cursor: pointer;
}

.topbar-user-menu summary::-webkit-details-marker {
  display: none;
}

.topbar-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #4ea1ff, #646df7 54%, #8658e8) border-box;
  border: 2px solid transparent;
  color: #4d5fe4;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(95, 109, 247, 0.14);
}

.topbar-avatar.large {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.topbar-avatar.has-image {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.topbar-avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-user-text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.topbar-user-text strong {
  overflow: hidden;
  color: #17203a;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-text small {
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-chevron {
  color: #667085;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.topbar-user-menu[open] .topbar-chevron {
  transform: rotate(180deg);
}

.topbar-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(330px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(16, 19, 45, 0.18);
  backdrop-filter: blur(18px);
}

.dropdown-user-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(95, 109, 247, 0.1);
}

.dropdown-user-head strong {
  color: #17203a;
  font-size: 18px;
}

.dropdown-user-head p {
  margin: 4px 0 0;
}

.dropdown-info-row {
  display: grid;
  gap: 6px;
}

.dropdown-info-row span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.dropdown-info-row strong,
.dropdown-info-row p {
  margin: 0;
  color: #263247;
  line-height: 1.6;
}

.dropdown-status-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dropdown-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(95, 109, 247, 0.1);
}

.dropdown-action-grid .primary-btn,
.dropdown-action-grid .ghost-btn,
.dropdown-action-grid .secondary-btn {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
}

.dropdown-action-grid .primary-btn:only-child,
.dropdown-action-grid .ghost-btn:only-child,
.dropdown-action-grid .secondary-btn:only-child {
  grid-column: 1 / -1;
}

.profile-avatar-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 50%;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #4ea1ff, #646df7 54%, #8658e8) border-box;
  color: #4d5fe4;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(95, 109, 247, 0.16);
}

.profile-avatar-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-avatar-actions .primary-btn,
.profile-avatar-actions .ghost-btn {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
}

.profile-avatar-actions .primary-btn:only-child {
  grid-column: 1 / -1;
}

.profile-center-layout {
  display: grid;
  gap: 16px;
}

.profile-section-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 20px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.profile-section-header h4 {
  margin: 2px 0 0;
}

.section-kicker {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
}

.profile-account-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: 16px;
  align-items: center;
}

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

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

.profile-setting-list div {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.72);
}

.profile-setting-list span,
.profile-content-stats span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.profile-setting-list strong {
  color: var(--text);
  line-height: 1.55;
}

.profile-content-head {
  align-items: flex-start;
}

.profile-content-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.profile-content-stats span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(95, 109, 247, 0.08);
  color: #4d5fe4;
}

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

.profile-content-column {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(95, 109, 247, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.profile-overview-grid {
  display: grid;
  align-items: stretch;
}

.profile-overview-single {
  grid-template-columns: minmax(0, 1fr);
}

.profile-overview-grid > .user-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-identity-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  gap: 18px;
  align-items: center;
}

.profile-identity-card .profile-avatar-card {
  margin-bottom: 0;
}

.profile-identity-card .profile-summary-list {
  margin-top: 0;
}

.profile-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-summary-list.compact {
  margin-top: 0;
}

.profile-summary-list div,
.profile-readonly-grid div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.profile-summary-list span,
.profile-readonly-grid span {
  color: var(--text-soft);
  font-size: 12px;
}

.profile-summary-list strong,
.profile-readonly-grid strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.profile-card-actions .primary-btn,
.profile-card-actions .ghost-btn {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
}

.profile-info-form {
  display: grid;
  gap: 12px;
}

.profile-info-form .field {
  gap: 5px;
}

.profile-info-form .field span {
  font-size: 12px;
}

.profile-info-form input {
  min-height: 38px;
  padding: 9px 11px;
}

.profile-info-modal {
  width: min(560px, 100%);
}

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

.profile-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  margin-top: 2px;
}

.profile-drawer-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-drawer-tabs {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
}

.profile-drawer-tab {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-areas:
    "index title"
    "index desc";
  column-gap: 10px;
  row-gap: 4px;
  min-height: 76px;
  padding: 14px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #344054;
  text-align: left;
}

.profile-drawer-tab:hover,
.profile-drawer-tab.active {
  border-color: rgba(95, 109, 247, 0.18);
  background: rgba(238, 243, 255, 0.78);
}

.profile-drawer-tab.active {
  box-shadow: inset 4px 0 0 #626cf6;
}

.profile-drawer-index {
  grid-area: index;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(95, 109, 247, 0.1);
  color: #4d5fe4;
  font-size: 12px;
  font-weight: 900;
}

.profile-drawer-tab strong {
  grid-area: title;
  min-width: 0;
  color: #1d2437;
  font-size: 15px;
}

.profile-drawer-tab small {
  grid-area: desc;
  min-width: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.45;
}

.profile-drawer-panel {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.profile-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-panel-title h4 {
  margin: 2px 0 0;
}

.profile-account-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  gap: 18px;
  align-items: stretch;
}

.profile-avatar-card.compact {
  margin-bottom: 0;
  padding: 16px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 16px;
  background: rgba(248, 250, 255, 0.72);
}

.profile-avatar-actions.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
  margin-top: 10px;
}

.profile-avatar-actions.compact .avatar-action-btn {
  width: auto;
  min-width: 104px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.profile-avatar-actions.compact .avatar-upload-btn {
  border-color: rgba(95, 109, 247, 0.24);
  background: rgba(238, 243, 255, 0.92);
  color: #4d5fe4;
}

.profile-avatar-actions.compact .avatar-upload-btn:hover {
  border-color: rgba(95, 109, 247, 0.38);
  background: rgba(226, 234, 255, 0.96);
}

.profile-avatar-actions.compact .avatar-remove-btn {
  border-color: rgba(239, 68, 68, 0.18);
  background: rgba(255, 255, 255, 0.78);
  color: #b42318;
}

.profile-avatar-actions.compact .avatar-remove-btn:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(255, 241, 241, 0.95);
}

.profile-avatar-actions.compact .avatar-remove-btn:disabled {
  border-color: rgba(148, 163, 184, 0.18);
  color: #98a2b3;
}

.profile-account-facts {
  margin-top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-default-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(95, 109, 247, 0.18);
}

.profile-default-row {
  padding: 14px 16px;
  border: 1px solid rgba(95, 109, 247, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.profile-default-row p,
.profile-default-row small {
  display: block;
  margin: 8px 0 0;
}

.profile-default-row p {
  color: #1d2437;
  font-weight: 800;
}

.profile-default-row small {
  color: #667085;
  line-height: 1.55;
}

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

.profile-security-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
}

.profile-security-row strong,
.profile-security-row p {
  margin: 0;
}

.profile-security-row p {
  margin-top: 6px;
  color: #667085;
  line-height: 1.55;
}

.profile-content-grid-drawer .profile-scroll-list {
  min-height: 360px;
  max-height: 360px;
}

.home-calendar-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
}

.calendar-head,
.calendar-month-row,
.calendar-week-row,
.calendar-grid,
.calendar-year-grid {
  display: grid;
}

.calendar-head {
  align-items: center;
}

.calendar-head h4 {
  margin: 0;
  color: #1d2437;
  font-size: 22px;
}

.calendar-month-row button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(95, 109, 247, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #475467;
  font-size: 20px;
  line-height: 1;
}

.calendar-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 4px;
  border-radius: 14px;
  background: #eef3ff;
}

.calendar-tabs button {
  display: grid;
  place-items: center;
  min-height: 36px;
  border-radius: 11px;
  background: transparent;
  color: #526071;
  font-size: 14px;
  font-weight: 700;
}

.calendar-tabs button.active {
  background: linear-gradient(135deg, #626cf6, #7d5bf1);
  color: #fff;
  box-shadow: 0 10px 20px rgba(95, 109, 247, 0.2);
}

.calendar-month-row {
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
}

.calendar-month-row strong {
  color: #293145;
  font-size: 16px;
  text-align: center;
}

.calendar-week-row,
.calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-row {
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.calendar-week-row span {
  padding: 2px 0;
}

.calendar-grid {
  row-gap: 8px;
  color: #344054;
  font-size: 14px;
  text-align: center;
}

.calendar-grid.week-view {
  margin-top: 2px;
}

.calendar-day {
  position: relative;
  display: grid;
  grid-template-rows: 18px 14px;
  place-items: center;
  justify-self: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  line-height: 1;
}

.calendar-day strong {
  font-size: 15px;
  font-weight: 700;
}

.calendar-day small {
  color: var(--text-soft);
  font-size: 11px;
  transform: scale(0.92);
  transform-origin: center;
}

.calendar-day.muted-day {
  color: #c3cada;
}

.calendar-day.muted-day small {
  color: #c3cada;
}

.calendar-day.today {
  background: linear-gradient(135deg, #626cf6, #7d5bf1);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 20px rgba(95, 109, 247, 0.28);
}

.calendar-day.today small {
  color: rgba(255, 255, 255, 0.86);
}

.dashboard-shell {
  display: grid;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  border: 1px solid rgba(63, 224, 255, 0.2);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(6, 30, 50, 0.94), rgba(5, 20, 34, 0.96)),
    radial-gradient(circle at top left, rgba(35, 213, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(40, 240, 183, 0.12), transparent 26%);
  box-shadow: 0 22px 70px rgba(6, 22, 36, 0.24);
  color: #e9fbff;
  overflow: hidden;
}

.dashboard-shell h3,
.dashboard-shell h4,
.dashboard-shell p {
  margin: 0;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.6fr);
  gap: 18px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid rgba(63, 224, 255, 0.2);
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(15, 91, 105, 0.36), rgba(16, 52, 78, 0.24)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 64px);
}

.dashboard-hero::before {
  content: "";
  position: absolute;
  inset: 9px 14px auto 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 224, 255, 0.7), transparent);
}

.dashboard-title-block {
  position: relative;
  display: grid;
  align-content: center;
  gap: 12px;
  min-height: 126px;
}

.dashboard-title-block h3 {
  color: #ffffff;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

.dashboard-title-block p {
  color: #9cecff;
  font-size: 16px;
  line-height: 1.6;
}

.dashboard-chip {
  justify-self: start;
  padding: 7px 14px;
  border: 1px solid rgba(63, 224, 255, 0.34);
  border-radius: 999px;
  background: rgba(35, 213, 255, 0.12);
  color: #b9f5ff;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-kpi {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 126px;
  padding: 18px;
  border: 1px solid rgba(63, 224, 255, 0.18);
  border-radius: 18px;
  background: rgba(8, 40, 62, 0.58);
  overflow: hidden;
}

.dashboard-kpi::after {
  content: "";
  position: absolute;
  inset: auto 12px 10px 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--kpi-color, #23d5ff);
  box-shadow: 0 0 20px var(--kpi-color, #23d5ff);
}

.dashboard-kpi.cyan { --kpi-color: #25d6ff; }
.dashboard-kpi.green { --kpi-color: #31f0ae; }
.dashboard-kpi.amber { --kpi-color: #ffd166; }
.dashboard-kpi.violet { --kpi-color: #a77dff; }

.dashboard-kpi span,
.dashboard-kpi small {
  color: #93b9c7;
  font-size: 13px;
}

.dashboard-kpi strong {
  color: #ffffff;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

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

.dashboard-span-3 { grid-column: span 3; }
.dashboard-span-4 { grid-column: span 4; }
.dashboard-span-5 { grid-column: span 5; }
.dashboard-span-6 { grid-column: span 6; }
.dashboard-span-12 { grid-column: span 12; }

.dashboard-panel {
  display: grid;
  gap: 14px;
  min-height: 260px;
  padding: 16px;
  border: 1px solid rgba(63, 224, 255, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(9, 47, 72, 0.72), rgba(7, 31, 51, 0.72)),
    linear-gradient(90deg, rgba(63, 224, 255, 0.09), transparent 44%, rgba(49, 240, 174, 0.07));
  box-shadow: inset 0 0 24px rgba(35, 213, 255, 0.04);
  overflow: hidden;
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dashboard-panel-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dashboard-panel-head span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #31f0ae;
  box-shadow: 0 0 12px rgba(49, 240, 174, 0.85);
  flex: 0 0 auto;
}

.dashboard-panel-head h4 {
  color: #eafeff;
  font-size: 16px;
  line-height: 1.35;
}

.dashboard-panel-head small {
  color: #7fb2c5;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  color: #86aebe;
  border: 1px dashed rgba(63, 224, 255, 0.18);
  border-radius: 14px;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
  align-content: center;
  min-height: 190px;
}

.dashboard-bars.compact {
  gap: 9px;
  min-height: 0;
}

.dashboard-bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 0.8fr) minmax(120px, 1.6fr) 54px;
  gap: 10px;
  align-items: center;
  color: #cdeff7;
  font-size: 13px;
}

.dashboard-bar-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-row strong {
  color: #ffffff;
  font-size: 13px;
  text-align: right;
}

.dashboard-bar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(123, 178, 194, 0.14);
  overflow: hidden;
}

.dashboard-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bar-color), rgba(255, 255, 255, 0.78));
  box-shadow: 0 0 16px color-mix(in srgb, var(--bar-color) 70%, transparent);
}

.dashboard-column-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 205px;
  padding-top: 12px;
}

.dashboard-column-chart.compact {
  min-height: 190px;
}

.dashboard-column {
  display: grid;
  grid-template-rows: 22px minmax(88px, 1fr) 32px;
  gap: 8px;
  align-items: end;
  min-width: 0;
  color: #bddce6;
  font-size: 12px;
  text-align: center;
}

.dashboard-column strong {
  color: #ffffff;
  font-size: 12px;
}

.dashboard-column i {
  display: block;
  align-self: end;
  width: 100%;
  height: var(--column-height);
  min-height: 4px;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), var(--column-color));
  box-shadow: 0 0 16px color-mix(in srgb, var(--column-color) 55%, transparent);
}

.dashboard-column span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-line-chart {
  display: grid;
  gap: 8px;
  min-height: 205px;
}

.dashboard-line-chart svg {
  width: 100%;
  min-height: 170px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 12.5%);
}

.dashboard-line-grid {
  fill: none;
  stroke: rgba(142, 202, 219, 0.18);
  stroke-width: 0.5;
}

.dashboard-line-area {
  opacity: 0.95;
}

.dashboard-line-stroke {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px rgba(35, 213, 255, 0.75));
}

.dashboard-line-axis {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  color: #8bb8c7;
  font-size: 12px;
  text-align: center;
}

.dashboard-donut-wrap {
  display: grid;
  grid-template-columns: minmax(130px, 0.85fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 204px;
}

.dashboard-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: min(172px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 26px rgba(35, 213, 255, 0.12);
}

.dashboard-donut::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: #08243a;
}

.dashboard-donut div {
  position: relative;
  display: grid;
  gap: 4px;
  place-items: center;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid rgba(63, 224, 255, 0.18);
  border-radius: 50%;
  background: rgba(7, 27, 45, 0.88);
}

.dashboard-donut strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.dashboard-donut span {
  color: #91bdca;
  font-size: 12px;
}

.dashboard-legend {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.dashboard-legend div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #cdeff7;
  font-size: 13px;
}

.dashboard-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 10px currentColor;
}

.dashboard-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-legend strong {
  color: #ffffff;
  font-size: 13px;
}

.dashboard-quota-panel {
  min-height: 300px;
}

.dashboard-quota-progress-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.dashboard-quota-progress-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(63, 224, 255, 0.14);
  border-radius: 16px;
  background: rgba(7, 31, 51, 0.62);
}

.dashboard-quota-ring {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  place-items: center;
  gap: 3px;
  justify-self: center;
  width: min(118px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--quota-color) 0 var(--quota-percent), rgba(123, 178, 194, 0.18) var(--quota-percent) 100%);
  box-shadow: 0 0 20px color-mix(in srgb, var(--quota-color) 30%, transparent);
}

.dashboard-quota-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #08243a;
}

.dashboard-quota-ring strong,
.dashboard-quota-ring span {
  position: relative;
}

.dashboard-quota-ring strong {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.dashboard-quota-ring span {
  color: #8fb9c6;
  font-size: 11px;
}

.dashboard-quota-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.dashboard-quota-meta h5,
.dashboard-quota-meta p,
.dashboard-quota-meta small {
  margin: 0;
}

.dashboard-quota-meta h5 {
  color: #eafeff;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quota-meta p,
.dashboard-quota-meta small {
  color: #8fb9c6;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard-quota-meta small {
  color: #cdeff7;
}

.dashboard-calendar-panel {
  min-height: 260px;
}

.dashboard-calendar-panel .home-calendar-card {
  gap: 11px;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.dashboard-calendar-panel .calendar-head h4,
.dashboard-calendar-panel .calendar-month-row strong {
  color: #eafeff;
}

.dashboard-calendar-panel .calendar-tabs {
  background: rgba(123, 178, 194, 0.14);
}

.dashboard-calendar-panel .calendar-tabs button {
  color: #9bc5d3;
}

.dashboard-calendar-panel .calendar-tabs button.active {
  background: linear-gradient(135deg, #25d6ff, #31f0ae);
  color: #062133;
  box-shadow: 0 10px 22px rgba(35, 213, 255, 0.18);
}

.dashboard-calendar-panel .calendar-month-row button {
  border-color: rgba(63, 224, 255, 0.18);
  background: rgba(8, 40, 62, 0.72);
  color: #d9f9ff;
}

.dashboard-calendar-panel .calendar-week-row,
.dashboard-calendar-panel .calendar-grid {
  color: #b7dbe5;
}

.dashboard-calendar-panel .calendar-day small {
  color: #7faebf;
}

.dashboard-calendar-panel .calendar-day.today {
  background: linear-gradient(135deg, #25d6ff, #31f0ae);
  color: #062133;
  box-shadow: 0 12px 20px rgba(35, 213, 255, 0.2);
}

.dashboard-calendar-panel .calendar-day.today small {
  color: rgba(6, 33, 51, 0.74);
}

.dashboard-calendar-panel .calendar-month-tile {
  border-color: rgba(63, 224, 255, 0.16);
  background: rgba(8, 40, 62, 0.64);
  color: #cdeff7;
}

.dashboard-calendar-panel .calendar-month-tile.today {
  background: linear-gradient(135deg, #25d6ff, #31f0ae);
  color: #062133;
}

.calendar-year-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-month-tile {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px solid rgba(95, 109, 247, 0.12);
  border-radius: 14px;
  background: rgba(246, 248, 255, 0.88);
  color: #344054;
  font-weight: 800;
}

.calendar-month-tile.today {
  background: linear-gradient(135deg, #626cf6, #7d5bf1);
  color: #fff;
  box-shadow: 0 12px 20px rgba(95, 109, 247, 0.22);
}

.calendar-month-tile i {
  position: absolute;
  bottom: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38a7ff;
}

.calendar-month-tile.today i {
  background: #ffdf6e;
}

.preview-card .button-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preview-card .button-row .primary-btn,
.preview-card .button-row .ghost-btn,
.preview-card .button-row .secondary-btn {
  width: 100%;
  min-height: 38px;
  padding: 9px 8px;
  border-radius: 12px;
  font-size: 14px;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .dashboard-span-3,
  .dashboard-span-4,
  .dashboard-span-5,
  .dashboard-span-6 {
    grid-column: span 6;
  }

  .dashboard-calendar-panel {
    grid-column: span 12;
  }
}

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

  .dashboard-span-3,
  .dashboard-span-4,
  .dashboard-span-5,
  .dashboard-span-6,
  .dashboard-span-12,
  .dashboard-calendar-panel {
    grid-column: 1;
  }

  .dashboard-donut-wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-donut {
    width: min(180px, 68vw);
  }

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

@media (max-width: 720px) {
  .admin-people-grid {
    grid-template-columns: 1fr;
  }

  .user-list-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .user-list-toolbar .status-pill {
    justify-self: start;
  }

  .topbar-actions,
  .topbar-user-menu {
    width: 100%;
  }

  .topbar-user-menu summary {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
  }

  .topbar-user-dropdown {
    left: 0;
    right: auto;
    width: 100%;
  }

  .profile-identity-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-account-grid,
  .profile-two-column,
  .profile-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-section-header,
  .profile-content-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-content-stats {
    justify-content: flex-start;
  }

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

  .home-calendar-card {
    padding: 18px;
  }

  .dashboard-shell {
    padding: 12px;
    border-radius: 20px;
  }

  .dashboard-hero,
  .dashboard-panel {
    border-radius: 16px;
  }

  .dashboard-hero-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-kpi {
    min-height: 104px;
  }

  .dashboard-bar-row {
    grid-template-columns: minmax(70px, 0.9fr) minmax(80px, 1.3fr) 48px;
    font-size: 12px;
  }

  .dashboard-column-chart {
    grid-template-columns: repeat(auto-fit, minmax(34px, 1fr));
  }

  .dashboard-quota-progress-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dashboard-quota-progress-card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    text-align: left;
  }

  .dashboard-quota-ring {
    width: 92px;
  }

.dashboard-quota-meta {
    text-align: left;
  }
}

.main.view-home .dashboard-screen {
  flex: 1 1 0;
  min-height: 0;
  height: auto;
  max-height: none;
}

.dashboard-screen {
  grid-template-rows: minmax(108px, 0.16fr) minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
}

.dashboard-screen .dashboard-hero {
  min-height: 0;
  padding: 12px 16px;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  border-radius: 14px;
}

.dashboard-screen .dashboard-title-block {
  min-height: 102px;
  gap: 12px;
}

.dashboard-screen .dashboard-title-block h3 {
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.22;
}

.dashboard-screen .dashboard-title-block p {
  font-size: 14px;
  line-height: 1.35;
}

.dashboard-screen .dashboard-chip {
  padding: 5px 11px;
  font-size: 12px;
}

.dashboard-screen .dashboard-hero-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-screen .dashboard-kpi {
  min-height: 0;
  padding: 12px 14px;
  border-radius: 13px;
}

.dashboard-screen .dashboard-kpi span,
.dashboard-screen .dashboard-kpi small {
  font-size: 13px;
}

.dashboard-screen .dashboard-kpi strong {
  font-size: clamp(22px, 2.1vw, 32px);
}

.dashboard-mosaic {
  display: grid;
  min-height: 0;
  height: 100%;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-template-rows: repeat(18, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-mosaic .dashboard-panel {
  min-height: 0;
  height: 100%;
  gap: 8px;
  padding: 11px;
  border-radius: 13px;
  grid-template-rows: auto minmax(0, 1fr);
}

.dashboard-mosaic .dashboard-panel-head h4 {
  font-size: 16px;
}

.dashboard-mosaic .dashboard-panel-head small {
  font-size: 12px;
}

.dashboard-area-categories { grid-column: 1 / 7; grid-row: 1 / 7; }
.dashboard-area-assets { grid-column: 1 / 7; grid-row: 7 / 12; }
.dashboard-area-org { grid-column: 1 / 7; grid-row: 12 / 18; }
.dashboard-area-assistant { grid-column: 7 / 19; grid-row: 1 / 8; }
.dashboard-area-quota { grid-column: 7 / 19; grid-row: 8 / 18; }
.dashboard-area-source { grid-column: 19 / 25; grid-row: 1 / 6; }
.dashboard-area-status { grid-column: 19 / 25; grid-row: 6 / 12; }
.dashboard-area-kb { grid-column: 19 / 25; grid-row: 12 / 18; }

.dashboard-mosaic .dashboard-bars {
  gap: 7px;
  min-height: 0;
}

.dashboard-mosaic .dashboard-bar-row {
  grid-template-columns: minmax(68px, 0.9fr) minmax(78px, 1.25fr) 42px;
  gap: 8px;
  font-size: 13px;
}

.dashboard-mosaic .dashboard-bar-track {
  height: 7px;
}

.dashboard-mosaic .dashboard-column-chart {
  min-height: 0;
  height: 100%;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
  padding-top: 4px;
}

.dashboard-mosaic .dashboard-column {
  grid-template-rows: 17px minmax(56px, 1fr) 22px;
  gap: 5px;
  font-size: 12px;
}

.dashboard-mosaic .dashboard-column strong {
  font-size: 12px;
}

.dashboard-rank-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  height: 100%;
}

.dashboard-rank-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--rank-color) 28%, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--rank-color) 13%, transparent), rgba(7, 31, 51, 0.58));
}

.dashboard-rank-card span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--rank-color) 18%, transparent);
  color: var(--rank-color);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-rank-card strong {
  min-width: 0;
  overflow: hidden;
  color: #dffaff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-rank-card em {
  color: #ffffff;
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-asset-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  height: 100%;
}

.dashboard-asset-tile {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 68px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--asset-color) 24%, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--asset-color) 20%, transparent), transparent 46%),
    rgba(7, 31, 51, 0.58);
}

.dashboard-asset-tile span {
  color: #9dccdc;
  font-size: 13px;
}

.dashboard-asset-tile strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
}

.dashboard-org-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  align-content: center;
  height: 100%;
}

.dashboard-org-card {
  display: grid;
  align-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 76px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--org-color) 24%, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--org-color) 13%, transparent), rgba(7, 31, 51, 0.68)),
    radial-gradient(circle at top right, color-mix(in srgb, var(--org-color) 20%, transparent), transparent 50%);
}

.dashboard-org-card strong {
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.dashboard-org-card span {
  min-width: 0;
  overflow: hidden;
  color: #b7dfe8;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-source-mix {
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 12px;
  height: 100%;
}

.dashboard-source-total {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(37, 214, 255, 0.2), transparent 48%),
    rgba(7, 31, 51, 0.58);
}

.dashboard-source-total span,
.dashboard-source-total small {
  color: #9dccdc;
  font-size: 13px;
}

.dashboard-source-total strong {
  color: #ffffff;
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1;
}

.dashboard-source-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-source-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--source-color) 24%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--source-color) 10%, rgba(7, 31, 51, 0.62));
}

.dashboard-source-item span,
.dashboard-source-item em {
  color: #a9d3df;
  font-size: 12px;
  font-style: normal;
}

.dashboard-source-item strong {
  color: #ffffff;
  font-size: 20px;
}

.dashboard-area-source .dashboard-source-mix {
  gap: 10px;
}

.dashboard-area-source .dashboard-source-total {
  padding: 10px 12px;
}

.dashboard-area-source .dashboard-source-total strong {
  font-size: clamp(26px, 2.2vw, 34px);
}

.dashboard-area-source .dashboard-source-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-area-source .dashboard-source-item {
  padding: 8px;
}

.dashboard-area-source .dashboard-source-item strong {
  font-size: 18px;
}

.dashboard-status-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
  height: 100%;
}

.dashboard-status-tile {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--status-color) 26%, rgba(255, 255, 255, 0.08));
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--status-color) 13%, transparent), rgba(7, 31, 51, 0.68)),
    radial-gradient(circle at top right, color-mix(in srgb, var(--status-color) 22%, transparent), transparent 48%);
}

.dashboard-status-tile span {
  color: #b5dce6;
  font-size: 14px;
}

.dashboard-status-tile strong {
  color: #ffffff;
  font-size: clamp(28px, 2.7vw, 40px);
  line-height: 1;
}

.dashboard-status-tile small {
  color: var(--status-color);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-area-status .dashboard-status-board {
  gap: 8px;
}

.dashboard-area-status .dashboard-status-tile {
  padding: 10px;
}

.dashboard-area-status .dashboard-status-tile strong {
  font-size: clamp(24px, 2vw, 34px);
}

.dashboard-answer-board {
  display: grid;
  grid-template-columns: 0.72fr 1fr;
  gap: 10px;
  align-items: stretch;
  height: 100%;
}

.dashboard-answer-total {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  min-width: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle, rgba(49, 240, 174, 0.2), transparent 58%),
    rgba(7, 31, 51, 0.64);
}

.dashboard-answer-total span {
  color: #9dccdc;
  font-size: 13px;
}

.dashboard-answer-total strong {
  color: #ffffff;
  font-size: clamp(30px, 2.8vw, 42px);
}

.dashboard-answer-list {
  display: grid;
  gap: 7px;
  align-content: center;
}

.dashboard-answer-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  color: #dffaff;
  font-size: 13px;
}

.dashboard-answer-item i {
  width: 8px;
  height: 24px;
  border-radius: 999px;
  background: var(--answer-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--answer-color) 52%, transparent);
}

.dashboard-answer-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-answer-item strong {
  color: #ffffff;
  font-size: 14px;
}

.dashboard-answer-item em {
  color: var(--answer-color);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.dashboard-assistant-entry {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 18px;
  align-items: center;
  align-content: center;
  height: 100%;
  padding: 20px 24px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 20%, rgba(49, 240, 174, 0.22), transparent 34%),
    radial-gradient(circle at 78% 70%, rgba(37, 214, 255, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(9, 59, 79, 0.86), rgba(7, 31, 51, 0.72));
  overflow: hidden;
}

.dashboard-assistant-entry::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(63, 224, 255, 0.16);
  border-radius: 14px;
  pointer-events: none;
}

.dashboard-assistant-copy,
.dashboard-assistant-actions {
  position: relative;
}

.dashboard-assistant-copy {
  display: grid;
  gap: 10px;
}

.dashboard-assistant-copy span {
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(49, 240, 174, 0.28);
  border-radius: 999px;
  background: rgba(49, 240, 174, 0.1);
  color: #9df7dd;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-assistant-copy strong {
  color: #ffffff;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.08;
}

.dashboard-assistant-copy p {
  max-width: 680px;
  color: #b7dfe8;
  font-size: 16px;
  line-height: 1.6;
}

.dashboard-assistant-actions {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.dashboard-assistant-actions .primary-btn,
.dashboard-assistant-actions .ghost-btn {
  width: 100%;
  min-height: 46px;
  border-radius: 13px;
  font-weight: 800;
}

.dashboard-mosaic .dashboard-donut-wrap {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(105px, 0.9fr) minmax(0, 1fr);
  gap: 10px;
}

.dashboard-mosaic .dashboard-donut {
  width: min(136px, 100%);
}

.dashboard-mosaic .dashboard-donut strong {
  font-size: 18px;
}

.dashboard-mosaic .dashboard-legend {
  gap: 6px;
}

.dashboard-mosaic .dashboard-legend div {
  gap: 6px;
  font-size: 12px;
}

.dashboard-quota-panel {
  min-height: 0;
}

.dashboard-quota-panel .dashboard-panel-head {
  margin-bottom: 0;
}

.dashboard-quota-progress-grid {
  height: 100%;
  min-height: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

.dashboard-quota-progress-card {
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-height: 288px;
  padding: 12px 10px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(18, 86, 105, 0.34), rgba(6, 29, 47, 0.74)),
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--quota-color) 22%, transparent), transparent 48%);
}

.dashboard-quota-tube {
  position: relative;
  display: grid;
  place-items: end center;
  width: min(92px, 86%);
  height: 218px;
  border-radius: 50% / 13%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03) 22%, transparent 42%, rgba(255, 255, 255, 0.18) 58%, rgba(255, 255, 255, 0.04) 78%),
    linear-gradient(180deg, color-mix(in srgb, var(--quota-color) 18%, transparent), rgba(5, 27, 45, 0.2));
  border: 1px solid color-mix(in srgb, var(--quota-color) 48%, rgba(255, 255, 255, 0.16));
  box-shadow:
    inset 14px 0 22px rgba(255, 255, 255, 0.06),
    inset -14px 0 22px rgba(0, 0, 0, 0.18),
    0 0 18px color-mix(in srgb, var(--quota-color) 24%, transparent);
  overflow: hidden;
}

.dashboard-quota-tube::before,
.dashboard-quota-tube::after,
.dashboard-quota-tube i::before {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 22px;
  border-radius: 50%;
}

.dashboard-quota-tube::before {
  top: -1px;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--quota-color) 58%, rgba(255, 255, 255, 0.2));
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--quota-color) 34%, rgba(255, 255, 255, 0.2)), rgba(255, 255, 255, 0.04) 68%);
}

.dashboard-quota-tube::after {
  bottom: -1px;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--quota-color) 34%, rgba(255, 255, 255, 0.08));
  background: color-mix(in srgb, var(--quota-color) 18%, transparent);
}

.dashboard-quota-tube i {
  position: absolute;
  inset: auto 0 0;
  height: var(--quota-fill);
  min-height: 12px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04) 28%, transparent 46%, rgba(255, 255, 255, 0.2) 64%, rgba(255, 255, 255, 0.04)),
    linear-gradient(180deg, color-mix(in srgb, var(--quota-color) 58%, rgba(255, 255, 255, 0.28)), color-mix(in srgb, var(--quota-color) 74%, rgba(0, 185, 255, 0.32)));
  opacity: 0.78;
  box-shadow: 0 -8px 24px color-mix(in srgb, var(--quota-color) 24%, transparent);
}

.dashboard-quota-tube i::before {
  top: -11px;
  z-index: 2;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--quota-color) 62%, rgba(255, 255, 255, 0.58)), color-mix(in srgb, var(--quota-color) 34%, transparent) 72%);
  box-shadow: 0 0 16px color-mix(in srgb, var(--quota-color) 42%, transparent);
}

.dashboard-quota-tube span {
  position: relative;
  z-index: 4;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.dashboard-quota-meta {
  gap: 3px;
  width: 100%;
}

.dashboard-quota-meta h5 {
  font-size: 13px;
}

.dashboard-quota-meta p,
.dashboard-quota-meta small {
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 1360px) {
  .main.view-home .dashboard-screen {
    height: auto;
    max-height: none;
  }

  .main.view-home {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .dashboard-mosaic {
    height: auto;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: none;
  }

  .dashboard-area-categories,
  .dashboard-area-assets,
  .dashboard-area-org,
  .dashboard-area-assistant,
  .dashboard-area-source,
  .dashboard-area-status,
  .dashboard-area-kb {
    grid-column: span 4;
    grid-row: auto;
    min-height: 220px;
  }

  .dashboard-area-quota {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 270px;
  }
}

.login-shell {
  place-items: center;
  padding: clamp(96px, 9vh, 128px) clamp(18px, 4vw, 56px) clamp(32px, 5vh, 64px);
  background: linear-gradient(135deg, #dfeaff, #f6f8ff);
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: none;
  border: 0;
  border-radius: 0;
}

.login-shell::before {
  z-index: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%);
  filter: none;
  transform: none;
  opacity: 1;
}

.login-shell::after {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(12, 24, 56, 0.18), rgba(255, 255, 255, 0.08) 38%, rgba(95, 109, 247, 0.08));
}

.login-brand-logo {
  top: clamp(22px, 3vw, 42px);
  left: clamp(24px, 4vw, 58px);
  width: clamp(440px, 38vw, 700px);
  height: clamp(66px, 5.8vw, 90px);
  max-height: none;
  padding: 10px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 38px rgba(17, 28, 64, 0.13);
  backdrop-filter: blur(10px);
}

.login-panel {
  width: min(470px, 100%);
  min-height: auto;
  grid-template-columns: 1fr;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.login-hero {
  display: none;
}

.login-form {
  width: 100%;
  padding: clamp(34px, 4vw, 50px);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 24px 72px rgba(17, 28, 64, 0.22);
  backdrop-filter: blur(13px);
}

.login-form .section-title {
  margin-bottom: 8px;
}

.login-form .field input,
.login-form .field select,
.login-form .field textarea {
  background: rgba(255, 255, 255, 0.76);
}

@media (min-aspect-ratio: 16 / 9) {
  .login-shell::after {
    background:
      linear-gradient(90deg, rgba(12, 24, 56, 0.16), rgba(255, 255, 255, 0.08) 38%, rgba(95, 109, 247, 0.07));
  }
}

@media (max-width: 720px) {
  .login-shell {
    padding: 104px 16px 24px;
  }

  .login-brand-logo {
    left: 50%;
    width: min(460px, calc(100vw - 32px));
    height: 64px;
    transform: translateX(-50%);
  }

  .login-form {
    padding: 28px 22px;
    border-radius: 24px;
  }
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 460px);
  align-items: center;
  gap: clamp(42px, 7vw, 110px);
  min-height: 100vh;
  padding: clamp(118px, 12vh, 150px) clamp(42px, 8vw, 132px) clamp(42px, 7vh, 82px);
  background:
    linear-gradient(110deg, rgba(9, 19, 43, 0.94), rgba(31, 58, 101, 0.88) 48%, rgba(90, 86, 129, 0.72)),
    linear-gradient(160deg, #102044 0%, #243c66 48%, #121a31 100%);
}

.login-shell::before {
  z-index: 0;
  filter: none;
  transform: none;
  opacity: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(24deg, transparent 0 48%, rgba(255, 255, 255, 0.08) 49%, transparent 51%),
    linear-gradient(150deg, rgba(86, 127, 190, 0.34), rgba(11, 21, 45, 0) 58%);
}

.login-shell::after {
  z-index: 0;
  inset: auto 0 0 0;
  height: 58%;
  background:
    linear-gradient(145deg, rgba(31, 52, 83, 0) 0 24%, rgba(20, 35, 58, 0.88) 25% 44%, transparent 45%),
    linear-gradient(28deg, transparent 0 33%, rgba(13, 25, 45, 0.96) 34% 53%, transparent 54%),
    linear-gradient(152deg, transparent 0 39%, rgba(19, 33, 56, 0.9) 40% 63%, transparent 64%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(7, 14, 31, 0.68));
  clip-path: polygon(0 34%, 11% 18%, 22% 37%, 34% 12%, 47% 42%, 60% 22%, 72% 49%, 86% 25%, 100% 43%, 100% 100%, 0 100%);
}

.login-brand-logo {
  left: clamp(28px, 4vw, 58px);
  width: clamp(500px, 42vw, 760px);
  height: clamp(82px, 6.8vw, 116px);
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 0.94;
  mix-blend-mode: multiply;
  filter: contrast(1.28) saturate(1.12);
}

.login-brand-logo .login-brand-mark {
  width: clamp(62px, 5.6vw, 98px);
  height: clamp(62px, 5.6vw, 98px);
}

.login-brand-logo .login-brand-text strong {
  font-size: clamp(34px, 3.35vw, 62px);
}

.login-brand-logo .login-brand-text span {
  font-size: clamp(8px, 0.72vw, 14px);
  letter-spacing: clamp(1.8px, 0.23vw, 4px);
}

.login-slogan {
  position: relative;
  z-index: 1;
  color: #ffffff;
  align-self: center;
  max-width: 560px;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.login-slogan h1 {
  margin: 0 0 10px;
  font-size: clamp(42px, 5.6vw, 78px);
  line-height: 1;
  font-weight: 900;
}

.login-slogan p {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 34px);
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
}

.login-panel {
  justify-self: end;
  width: min(440px, 100%);
  z-index: 1;
}

.login-form {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 90px rgba(5, 13, 31, 0.32);
  backdrop-filter: blur(18px);
}

.login-demo-block {
  display: grid;
  gap: 8px;
}

.login-demo-block > p {
  margin: 0;
  font-weight: 700;
}

.login-form .login-shortcuts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.login-form .shortcut-btn {
  min-height: 56px;
  padding: 9px 10px;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.68);
}

.login-form .shortcut-btn strong {
  font-size: 13px;
}

.login-form .shortcut-btn .small {
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    padding-top: 112px;
  }

  .login-slogan {
    width: min(440px, 100%);
    justify-self: center;
    text-align: center;
  }

  .login-panel {
    justify-self: center;
  }
}

@media (max-width: 720px) {
  .login-shell {
    padding: 96px 16px 26px;
  }

  .login-brand-logo {
    left: 50%;
    transform: translateX(-50%);
    width: min(460px, calc(100vw - 32px));
    height: 58px;
  }

  .login-brand-logo .login-brand-mark {
    width: 48px;
    height: 48px;
  }

  .login-brand-logo .login-brand-text {
    gap: 4px;
  }

  .login-brand-logo .login-brand-text strong {
    font-size: clamp(19px, 5.6vw, 27px);
  }

  .login-brand-logo .login-brand-text span {
    font-size: clamp(6px, 1.8vw, 8px);
    letter-spacing: clamp(0.8px, 0.24vw, 1.2px);
  }

  .login-slogan h1 {
    font-size: 40px;
  }

  .login-slogan p {
    font-size: 20px;
    letter-spacing: 0.04em;
  }

  .login-form .login-shortcuts {
    grid-template-columns: 1fr;
  }
}

.login-shell {
  grid-template-columns: minmax(360px, 1fr) minmax(390px, 450px);
  align-items: center;
  gap: clamp(56px, 8vw, 128px);
  padding: clamp(118px, 12vh, 150px) clamp(54px, 8.5vw, 150px) clamp(54px, 8vh, 92px);
  background:
    linear-gradient(105deg, rgba(4, 12, 28, 0.58), rgba(7, 29, 52, 0.2) 43%, rgba(5, 11, 22, 0.34)),
    linear-gradient(180deg, rgba(26, 153, 205, 0.16), rgba(255, 255, 255, 0.02) 44%, rgba(4, 14, 28, 0.22)),
    url("/sucai/%E5%8A%9E%E5%85%AC%E6%A5%BC.jpg") center / cover no-repeat;
  background-color: #102c3f;
  background-blend-mode: normal, soft-light, normal;
}

.login-shell::before {
  z-index: 0;
  background:
    radial-gradient(circle at 18% 32%, rgba(88, 188, 239, 0.18), transparent 34%),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(90deg, rgba(2, 8, 19, 0.46), rgba(8, 27, 48, 0.08) 48%, rgba(3, 8, 18, 0.28));
  opacity: 1;
}

.login-shell::after {
  z-index: 0;
  inset: 0;
  height: auto;
  clip-path: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 17%, rgba(0, 0, 0, 0.16) 100%),
    linear-gradient(25deg, transparent 0 58%, rgba(255, 255, 255, 0.1) 59%, transparent 61%),
    radial-gradient(ellipse at center, transparent 48%, rgba(0, 0, 0, 0.18) 100%);
}

.login-slogan {
  max-width: 680px;
  align-self: center;
  padding-left: clamp(8px, 1.4vw, 22px);
  transform: translateY(-2vh);
}

.login-slogan::before {
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, #61b7ff, #7d6cff);
  box-shadow: 0 10px 24px rgba(97, 183, 255, 0.34);
}

.login-slogan h1 {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: clamp(54px, 7vw, 104px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0;
}

.login-slogan p {
  margin: 18px 0 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: clamp(24px, 2.55vw, 40px);
  line-height: 1.28;
  letter-spacing: 0.05em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
}

.login-panel {
  align-self: center;
  justify-self: end;
}

.login-form {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 30px 90px rgba(2, 9, 24, 0.34);
  backdrop-filter: blur(22px) saturate(135%);
  -webkit-backdrop-filter: blur(22px) saturate(135%);
}

.login-form .section-title {
  color: #111a32;
}

.login-form .field > span,
.login-form .login-demo-block > p {
  color: rgba(17, 26, 50, 0.72);
}

.login-form .field input,
.login-form .field select,
.login-form .field textarea {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.56);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 8px 22px rgba(12, 22, 44, 0.08);
}

.login-form .secondary-btn,
.login-form .shortcut-btn {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.44);
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 112px 26px 34px;
  }

  .login-slogan {
    max-width: 520px;
    padding-left: 0;
    text-align: center;
    transform: none;
  }

  .login-slogan::before {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 720px) {
  .login-shell {
    padding: 94px 16px 24px;
  }

  .login-slogan::before {
    width: 54px;
    height: 3px;
    margin-bottom: 18px;
  }

  .login-slogan h1 {
    font-size: 42px;
  }

  .login-slogan p {
    margin-top: 10px;
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: 0.02em;
  }
}
