/* Unified visual polish layer — loaded after the legacy admin and user styles. */
:root {
  --polish-primary: #5b5ce2;
  --polish-primary-strong: #4b4dc8;
  --polish-primary-soft: #f0f1ff;
  --polish-accent: #21b69d;
  --polish-danger: #e84b5f;
  --polish-warning: #e79a28;
  --polish-ink: #172033;
  --polish-text: #344054;
  --polish-muted: #7a8699;
  --polish-line: #e3e8ef;
  --polish-line-strong: #cfd7e3;
  --polish-canvas: #f3f6fa;
  --polish-surface: #fff;
  --polish-surface-muted: #f8fafc;
  --polish-radius-sm: 7px;
  --polish-radius: 11px;
  --polish-radius-lg: 15px;
  --polish-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 3px 10px rgba(16, 24, 40, .035);
  --polish-shadow: 0 1px 2px rgba(16, 24, 40, .03), 0 12px 30px rgba(37, 46, 75, .07);
  --polish-shadow-lg: 0 24px 70px rgba(22, 31, 55, .22);
  --polish-font: "Segoe UI Variable", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

html { color-scheme: light; }
html, body { background: var(--polish-canvas); color: var(--polish-text); font-family: var(--polish-font); font-size: 14px; line-height: 1.55; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font-family: inherit; }
a, button, input, select, textarea, summary { transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(91, 92, 226, .18);
  outline-offset: 2px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--polish-primary); }
::selection { color: #fff; background: rgba(91, 92, 226, .82); }

/* Shared application chrome */
.app-shell { grid-template: 58px minmax(0, 1fr) / 236px minmax(0, 1fr); background: var(--polish-canvas); }
.topbar {
  grid-template-columns: 236px 58px minmax(0, 1fr) auto;
  height: 58px;
  background: linear-gradient(100deg, #2f9cf4 0%, #74d5f7 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .09), 0 5px 18px rgba(27, 37, 82, .15);
}
.wordmark { height: 58px; background: rgba(255, 255, 255, .055); font-size: 20px; font-weight: 650; letter-spacing: .025em; }
.menu-toggle { width: 58px; border-left: 1px solid rgba(255, 255, 255, .07); border-right: 1px solid rgba(255, 255, 255, .07); }
.menu-toggle:hover, .logout-btn:hover { background: rgba(255, 255, 255, .09); }
.topbar-actions { gap: 20px; padding-right: 18px; font-weight: 550; }
.backend-link, .user-name { font-size: 13px; }
.quota-pill { min-height: 32px; box-sizing: border-box; padding: 4px 12px; border-color: rgba(255, 255, 255, .28); background: rgba(5, 13, 40, .13); box-shadow: none; }
.user-avatar { width: 30px; height: 30px; color: var(--polish-primary); box-shadow: 0 0 0 3px rgba(255, 255, 255, .13); }

.sidebar {
  top: 58px;
  height: calc(100vh - 58px);
  background: linear-gradient(180deg, #2f9cf4 0%, #74d5f7 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .04), 7px 0 22px rgba(29, 37, 69, .08);
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar, .user-sidebar::-webkit-scrollbar { width: 0; height: 0; }
.sidebar nav { padding: 12px 10px 24px; }
.sidebar a { position: relative; min-height: 48px; margin: 2px 0; padding: 0 14px; gap: 12px; border-radius: 9px; color: #fff; font-size: 14px; }
.sidebar a:hover { color: #fff; background: rgba(255, 255, 255, .075); }
.sidebar a.active { color: #fff; background: linear-gradient(90deg, rgba(103, 96, 238, .42), rgba(81, 108, 217, .22)); box-shadow: inset 3px 0 #8d83ff; }
.sidebar .nav-icon { width: 19px; height: 19px; margin: 0; opacity: 1; filter: none; }
.sidebar b { font-weight: 550; }
.content { padding: 28px 34px 48px; background: var(--polish-canvas); }
.content:not(.content-dashboard) { padding: 22px 24px 42px; }
.app-shell[data-sidebar="closed"] { grid-template-columns: 58px minmax(0, 1fr); }
.app-shell[data-sidebar="closed"] .topbar { grid-template-columns: 58px 58px minmax(0, 1fr) auto; }

.alert { margin: 0 0 14px; padding: 11px 14px; border-radius: var(--polish-radius-sm); box-shadow: var(--polish-shadow-sm); }

/* Admin cards, dashboard and workspaces */
.panel, .workspace-panel, .stat-card, .profile-workspace, .cloud-workspace {
  border: 1px solid var(--polish-line);
  background: var(--polish-surface);
  box-shadow: var(--polish-shadow-sm);
}
.panel { margin-top: 20px; border-radius: var(--polish-radius); padding: 18px; }
.panel h2 { color: var(--polish-ink); font-size: 14px; font-weight: 650; }
.workspace-panel { min-height: calc(100vh - 122px); border-radius: var(--polish-radius); overflow: hidden; box-shadow: var(--polish-shadow); }
.metric-grid { gap: 16px; }
.metric-card {
  min-height: 134px;
  padding: 19px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(32, 47, 87, .12);
}
.metric-card p { font-size: 16px; font-weight: 650; letter-spacing: .01em; }
.metric-card strong { margin: 10px 0 8px; font-size: clamp(25px, 1.8vw, 32px); letter-spacing: -.02em; }
.metric-card small { color: rgba(255, 255, 255, .86); font-size: 12px; }
.metric-card.blue { background: linear-gradient(135deg, #3578d8, #615adf); }
.metric-card.green { background: linear-gradient(135deg, #159d78, #36b65a); }
.metric-card.purple { background: linear-gradient(135deg, #7251cf, #a85ecc); }
.metric-card.orange { background: linear-gradient(135deg, #e7872d, #ec6545); }
.metric-card.sunset { background: linear-gradient(135deg, #754b77, #bd6c4c); }
.metric-icon { top: 15px; right: 15px; width: 38px; height: 38px; opacity: .9; }
.metric-icon img { width: 38px; height: 38px; }
.dashboard-chart-grid, .metric-grid.compact { gap: 16px; }
.dashboard-chart-grid .panel { min-height: 310px; }
.stat-card { min-height: 116px; border-radius: var(--polish-radius); padding: 17px; }
.stat-card strong { color: var(--polish-ink); font-size: 26px; }

.table-toolbar, .user-toolbar { min-height: 66px; padding: 13px 16px; border-bottom: 1px solid var(--polish-line); background: linear-gradient(180deg, #fff, #fcfdff); }
.toolbar-left, .toolbar-right, .round-actions { gap: 8px; }
.tool-btn, .view-btn, .search-toggle, .user-tool, .user-toolbar-right button {
  min-height: 36px;
  border-radius: var(--polish-radius-sm);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.tool-btn { padding: 0 14px; }
.tool-btn.refresh { width: 36px; border-radius: 9px; background: #5a72dd; }
.tool-btn.add, .user-tool.add { background: #12a98f; }
.tool-btn.delete, .user-tool.delete { background: #ef7583; }
.tool-btn.more { background: #667085; }
.tool-btn.sync { background: #7869df; }
.tool-btn:hover, .circle-action:hover, .user-tool:hover, .user-round-action:hover { transform: translateY(-1px); filter: saturate(1.04); box-shadow: 0 6px 14px rgba(32, 43, 75, .13); }
.view-btn, .search-toggle, .user-toolbar-right button { min-width: 38px; border: 1px solid var(--polish-line-strong); color: #536078; background: #fff; }
.view-btn:hover, .search-toggle:hover, .user-toolbar-right button:hover { border-color: #b8c4d6; color: var(--polish-primary); background: var(--polish-primary-soft); }

.table-wrap, .user-table-wrap { scrollbar-width: thin; scrollbar-color: #c1cad7 transparent; }
.data-table, .user-data-table { color: var(--polish-text); font-size: 13px; }
.data-table th, .user-data-table th {
  height: 48px;
  padding: 9px 12px;
  border-color: var(--polish-line);
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .005em;
}
.data-table td, .user-data-table td { height: 52px; padding: 9px 12px; border-color: #edf0f5; color: #536075; }
.data-table tbody tr:nth-child(even), .user-data-table tbody tr:nth-child(even) { background: #fbfcfe; }
.data-table tbody tr:hover, .user-data-table tbody tr:hover { background: #f5f7ff; }
.data-table tbody tr, .user-data-table tbody tr { transition: background-color .14s ease; }
.circle-action, .user-round-action { width: 32px; height: 32px; border-radius: 9px; }
.circle-action.edit, .user-round-action { background: #6d64df; }
.circle-action.delete, .user-round-action.delete { background: var(--polish-danger); }
.outline-badge, .outline-action, .image-link, .user-link-button, .user-badge {
  min-height: 30px;
  border-radius: 6px;
  padding: 0 11px;
  font-weight: 550;
}
.table-footer, .user-table-footer { min-height: 58px; padding: 10px 16px; border-top: 0; color: #687386; font-size: 12px; }
.table-footer button, .table-footer a, .table-footer input, .user-pagination button, .user-pagination input { border-color: var(--polish-line-strong); border-radius: 6px; background: #fff; }
.table-footer nav a.active, .user-pagination [aria-current="page"] { background: #4b4e7a; }
.empty, .user-empty { color: #98a2b3 !important; }

/* Shared form and dialog treatment */
.grid-form input, .grid-form select, .grid-form textarea,
.cloud-form input, .cloud-form select, .cloud-form textarea,
.profile-page-form input, .profile-page-form select, .profile-page-form textarea,
.filter-pop input, .filter-pop select,
.modal-form input:not([type="radio"]):not([type="checkbox"]), .modal-form select, .modal-form textarea,
.user-form-grid input, .user-form-grid select, .user-form-grid textarea,
.reference-form-stack input, .reference-form-stack select, .reference-form-stack textarea,
.task-form-body input, .task-form-body select, .task-form-body textarea,
.article-form-body input, .article-form-body select, .article-form-body textarea,
.user-keyword-form input, .user-keyword-form textarea,
.knowledge-form-body input, .knowledge-form-body select, .knowledge-form-body textarea {
  border: 1px solid var(--polish-line-strong);
  border-radius: 8px;
  color: var(--polish-text);
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(16, 24, 40, .015);
}
.grid-form input:focus, .grid-form select:focus, .grid-form textarea:focus,
.cloud-form input:focus, .cloud-form select:focus, .cloud-form textarea:focus,
.profile-page-form input:focus, .profile-page-form select:focus, .profile-page-form textarea:focus,
.filter-pop input:focus, .filter-pop select:focus,
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus,
.user-form-grid input:focus, .user-form-grid select:focus, .user-form-grid textarea:focus,
.reference-form-stack input:focus, .reference-form-stack select:focus, .reference-form-stack textarea:focus,
.task-form-body input:focus, .task-form-body select:focus, .task-form-body textarea:focus,
.article-form-body input:focus, .article-form-body select:focus, .article-form-body textarea:focus,
.user-keyword-form input:focus, .user-keyword-form textarea:focus,
.knowledge-form-body input:focus, .knowledge-form-body select:focus, .knowledge-form-body textarea:focus {
  border-color: #7b7dea;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(91, 92, 226, .11);
}
.primary-btn, .user-submit, .diagnosis-submit {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #5966e9, #6756d8);
  font-weight: 650;
  box-shadow: 0 6px 14px rgba(81, 79, 204, .18);
}
.primary-btn:hover, .user-submit:hover, .diagnosis-submit:hover { transform: translateY(-1px); box-shadow: 0 9px 18px rgba(81, 79, 204, .23); }
.reset-btn, .user-reset { min-height: 38px; border: 1px solid var(--polish-line-strong); border-radius: 8px; color: #667085; background: #fff; }

.modal-backdrop, .user-modal-host { background: rgba(17, 24, 39, .42); backdrop-filter: blur(3px); }
.app-modal, .user-record-modal {
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--polish-shadow-lg);
}
.enterprise-modal {
  top: 50%;
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100vw - 48px));
  height: min(760px, calc(100dvh - 64px));
  max-height: calc(100dvh - 64px);
  transform: translate(-50%, -50%);
}
.enterprise-modal > header { flex: 0 0 50px; }
.enterprise-modal.is-minimized > header { flex-basis: 44px; }
.enterprise-modal .enterprise-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}
.enterprise-modal .enterprise-form .enterprise-form-body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  padding: 24px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 20px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.enterprise-modal .enterprise-form-body :is(input, select, textarea) { min-width: 0; }
.enterprise-modal .enterprise-form > footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--polish-line);
  background: #f8fafc;
}
.enterprise-modal .enterprise-edit-quota-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 24px;
}
.enterprise-modal .enterprise-edit-quota-grid > label {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-content: start;
  margin: 0 !important;
  text-align: left;
}
.enterprise-modal .enterprise-edit-quota-grid > label > span:first-child { padding: 0; text-align: left; }
.enterprise-modal .enterprise-edit-quota-grid > label > small { grid-column: 1; margin: 0; white-space: normal; }
.enterprise-modal .quota-module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}
.enterprise-modal .quota-module-grid > label {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 0;
}
.enterprise-modal .quota-module-grid > label > small { grid-column: 2; margin-top: -7px; }
.enterprise-modal .quota-base-grid { column-gap: 24px; }
.app-modal > header, .user-record-modal > header {
  height: 50px;
  padding: 0 17px;
  color: #fff;
  background: linear-gradient(105deg, #5057c7 0%, #5f62dc 54%, #3e7fca 100%);
  font-size: 14px;
  font-weight: 600;
}
.app-modal > header strong, .user-record-modal > header b { font-size: 14px; font-weight: 600; }
.modal-form { max-height: calc(75vh - 50px); padding: 24px 58px 0; }
.modal-form footer, .user-record-modal form > footer, .keyword-tool-footer {
  min-height: 60px;
  border-top: 1px solid var(--polish-line);
  background: #f8fafc;
}
.model-modal {
  top: 50%;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
  transform: translate(-50%, -50%);
}
.model-modal .model-form {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 200px);
  padding-bottom: 20px;
  overflow-y: auto;
}
.model-modal-footer {
  display: flex;
  flex: 0 0 60px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 18px;
  border-top: 1px solid var(--polish-line);
  background: #f8fafc;
}
.model-modal-footer .primary-btn,
.model-modal-footer .reset-btn { min-width: 76px; }
.app-modal.model-modal.is-maximized .model-form {
  height: auto;
  max-height: none;
}
.app-modal .modal-window-controls button { color: rgba(255, 255, 255, .9); }
.app-modal .modal-window-controls button:hover { background: rgba(255, 255, 255, .12); }
.app-modal.is-maximized { border: 0; border-radius: 0; }

/* User portal chrome */
.user-portal { background: var(--polish-canvas); color: var(--polish-text); font-family: var(--polish-font); }
.user-shell { --user-side: 236px; padding-top: 62px; background: var(--polish-canvas); }
.user-topbar {
  grid-template-columns: var(--user-side) minmax(0, 1fr) auto;
  height: 62px;
  background: linear-gradient(100deg, #2f9cf4 0%, #74d5f7 100%);
  box-shadow: 0 4px 18px rgba(30, 44, 94, .15);
}
.user-brand { background: rgba(255, 255, 255, .055); font-size: 20px; font-weight: 650; letter-spacing: .025em; }
.user-notice { padding: 0 22px; color: rgba(255, 255, 255, .88); font-size: 12px; font-weight: 500; }
.user-account { gap: 16px; padding-right: 20px; }
.user-account > a { font-size: 13px; font-weight: 550; }
.user-expiry { padding: 7px 12px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; color: #423d50; background: #f4d4bf; font-size: 12px; }
.user-sidebar {
  top: 62px;
  width: var(--user-side);
  border-right: 1px solid var(--polish-line);
  background: #fff;
  box-shadow: 5px 0 18px rgba(31, 42, 68, .035);
  scrollbar-width: none;
}
.user-sidebar nav { gap: 1px; padding: 14px 10px 32px; }
.user-sidebar a, .user-sidebar button { min-height: 42px; border-radius: 8px; color: #354052; }
.user-nav-main, .user-nav-item { grid-template-columns: 21px minmax(0, 1fr) auto auto; gap: 9px; padding: 0 12px; }
.user-sidebar b { font-size: 13px; font-weight: 550; }
.user-sidebar .ui-icon { width: 17px; height: 17px; }
.user-nav-group { padding: 16px 11px 6px; color: #98a2b3; font-size: 11px; font-weight: 600; letter-spacing: .08em; }
.user-nav-main.active, .user-nav-item.active, .user-nav-section.open > .user-nav-item {
  color: #4a4cc7;
  background: #eef0ff;
  box-shadow: inset 3px 0 #6869e7;
}
.user-sidebar a:hover, .user-sidebar button:hover { color: #4b4dc8; background: #f5f6ff; }
.user-nav-sub { padding: 4px 0 6px; }
.user-nav-sub a { min-height: 37px; padding-left: 41px; border-radius: 7px; color: #596579; font-size: 12px; }
.user-nav-sub a.active { color: #4b4dc8; background: #f0f1ff; font-weight: 600; }
.user-content { padding: 22px 24px 40px; background: var(--polish-canvas); }

/* User dashboard */
.user-dashboard-grid { grid-template-columns: minmax(720px, 1fr) 306px; gap: 20px; max-width: 1710px; }
.user-dashboard-rail { gap: 20px; }
.user-hero {
  grid-template-columns: minmax(230px, 1fr) 280px minmax(230px, 1fr);
  min-height: 310px;
  border: 1px solid rgba(112, 132, 190, .28);
  border-radius: var(--polish-radius-lg);
  background-image: linear-gradient(90deg, rgba(7, 20, 51, .66), rgba(9, 30, 75, .27) 39%, rgba(11, 34, 78, .20) 61%, rgba(8, 22, 54, .66)), url("../img/user-dashboard-ai-bg.png");
  background-position: center 55%;
  background-size: cover;
  box-shadow: 0 16px 40px rgba(31, 48, 92, .16);
}
.user-hero::before { inset: 0; width: auto; height: auto; border-radius: inherit; background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(6,14,39,.18)); filter: none; }
.user-hero::after { display: none; }
.hero-side { gap: 11px; padding: 22px 24px; }
.hero-side > div {
  min-height: 88px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 11px;
  color: #fff;
  background: rgba(16, 35, 80, .44);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 10px 24px rgba(3, 12, 37, .18);
  backdrop-filter: blur(8px);
  transform: none;
}
.hero-right > div { transform: none; }
.hero-side > div:hover { border-color: rgba(124, 218, 255, .48); background: rgba(27, 50, 105, .6); transform: translateY(-2px); }
.hero-side > div span { width: 36px; height: 36px; color: #87d9ff; font-size: 18px; text-shadow: none; }
.hero-side > div .ui-icon { width: 22px; height: 22px; }
.hero-side > div b { color: rgba(246, 249, 255, .91); font-size: 12px; font-weight: 550; }
.hero-side > strong { padding: 11px 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 9px; color: #fff; background: rgba(12, 29, 68, .56); box-shadow: none; font-size: 14px; backdrop-filter: blur(8px); }
.hero-orbit { width: 218px; height: 218px; border-color: rgba(157, 205, 255, .22); background: radial-gradient(circle, rgba(42, 89, 180, .30), rgba(7, 24, 61, .06) 55%); box-shadow: 0 0 0 25px rgba(133, 190, 255, .045); }
.hero-orbit::before { width: 154px; height: 72px; border-color: rgba(126, 224, 255, .38); }
.hero-orbit > b { color: #eef7ff; font-size: 58px; font-weight: 750; text-shadow: 0 0 24px rgba(99, 195, 255, .7); }
.hero-orbit > i { width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 10px; background: rgba(63, 104, 221, .88); backdrop-filter: blur(5px); }
.hero-orbit > i .ui-icon { width: 17px; height: 17px; }
.hero-orbit > i:nth-of-type(1) { top: 18px; left: 58px; background: #6557db; }
.hero-orbit > i:nth-of-type(2) { top: 30px; right: 42px; background: #129f83; }
.hero-orbit > i:nth-of-type(3) { right: 15px; bottom: 52px; background: #287fc2; }
.hero-orbit > i:nth-of-type(4) { bottom: 12px; left: 66px; background: #314a86; }

.user-feature-grid { gap: 16px; margin-top: 20px; }
.feature-card { min-height: 216px; padding: 21px 19px 18px; border-color: var(--polish-line); border-radius: 12px; box-shadow: var(--polish-shadow-sm); }
.feature-card:hover { border-color: #cfd7ee; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(37, 49, 84, .10); }
.feature-card small { padding: 4px 9px; border-radius: 6px; background: #5966d8; font-size: 11px; font-weight: 600; }
.feature-card h2 { margin: 14px 0 12px; color: #315eae; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.feature-card p { min-height: 84px; color: #5d6879; font-size: 12px; line-height: 1.8; }
.feature-card > a { display: inline-flex; align-items: center; margin-top: 4px; color: #4d59d2; font-size: 12px; }
.feature-card > a b { background: #5c64d9; }
.feature-card.violet { background: linear-gradient(145deg, #fff, #faf8ff); }
.feature-card.mint { background: linear-gradient(145deg, #fff, #f5fcfa); }
.feature-card.cyan { background: linear-gradient(145deg, #fff, #f5fbfd); }
.user-chart-grid { gap: 16px; margin-top: 20px; }
.user-chart-grid > article { min-height: 280px; padding: 18px; border-color: var(--polish-line); border-radius: 12px; box-shadow: var(--polish-shadow-sm); }
.user-chart-grid h2 { color: #4d59c8; font-size: 18px; font-weight: 650; }

.quick-panel, .flow-panel { padding: 18px 15px 15px; border-color: var(--polish-line); border-radius: 13px; background: #fff; box-shadow: var(--polish-shadow-sm); }
.quick-panel > h2, .flow-panel > h2 { margin-bottom: 17px; color: #3f4d67; font-size: 17px; font-weight: 650; text-align: left; }
.quick-grid { gap: 10px; }
.quick-grid article, .quick-grid .quick-card { min-height: 120px; padding: 14px 8px; border: 1px solid #edf0f5; border-radius: 10px; background: #fbfcfe; }
.quick-grid .quick-card:hover { border-color: #d8def1; background: #fff; transform: translateY(-2px); box-shadow: var(--polish-shadow-sm); }
.quick-grid article > span, .quick-grid .quick-card > span, .flow-panel li > span { width: 38px; height: 38px; box-shadow: 0 0 0 4px rgba(98, 217, 152, .10); }
.quick-grid h3 { margin: 10px 0 5px; color: #27344a; font-size: 15px; }
.quick-grid p { color: #8490a3; font-size: 10px; }
.flow-panel ol { gap: 8px; }
.flow-panel li { min-height: 48px; border: 1px solid #edf0f5; border-radius: 9px; background: #fbfcfe; }
.flow-panel li:hover { border-color: #d9dfed; background: #fff; }
.flow-panel li b { color: #445066; font-size: 12px; }
.flow-panel li a { color: #98a2b3; font-size: 10px; }

/* User lists and specialized forms */
.user-workspace { min-height: calc(100vh - 106px); border-color: var(--polish-line); border-radius: 12px; background: #fff; box-shadow: var(--polish-shadow); }
.user-toolbar { min-height: 64px; border-radius: 12px 12px 0 0; }
.user-tool { min-height: 36px; padding: 0 13px; border-radius: 8px; font-size: 12px; }
.user-tool.icon-only { width: 36px; border-radius: 9px; }
.user-tool.refresh { background: #5a6cda; }
.user-toolbar-right button { width: 38px; min-height: 36px; border-radius: 8px; }
.user-toolbar-right button:last-child { border-radius: 9px; }
.user-inline-search { padding: 12px 16px; border-bottom-color: var(--polish-line); background: #f8fafc; }
.user-inline-search input { height: 39px; border-color: var(--polish-line-strong); border-radius: 8px; }
.user-table-note { color: #7e8999; }
.user-data-table th, .user-data-table td { height: 52px; }
.user-data-table th { height: 47px; }
.user-table-footer { min-height: 58px; color: #687386; }
.user-round-action { width: 31px; height: 31px; }
.user-switch { width: 38px; height: 21px; }
.user-status { color: #159d84; }
.user-badge, .user-link-button { border-radius: 6px; font-size: 11px; }

.user-record-modal { width: min(980px, calc(100vw - 96px)); height: min(680px, calc(100vh - 88px)); }
.user-record-modal > header { flex-basis: 50px; height: 50px; }
.user-form-grid { gap: 20px 28px; padding: 30px 36px; }
.user-form-grid label { color: #455166; font-size: 13px; }
.user-form-grid input, .user-form-grid select { height: 41px; }
.user-form-grid textarea { min-height: 160px; }
.app-modal.is-maximized.user-record-modal { inset: 62px 0 0 236px; }
.app-modal.is-maximized .user-form-grid { padding: 32px 8vw; }
.app-modal.is-minimized.user-record-modal { border-radius: 10px; }
.reference-form-stack > label, .user-keyword-form > label, .task-form-body > label, .article-form-body > label, .knowledge-form-body > label { font-size: 13px; }
.reference-radio-row span { border-radius: 5px; background: #c9a7f0; }
.reference-radio-row input:checked + span { background: #6758df; }
.keyword-mode { height: 34px; border-radius: 7px; font-size: 12px; font-weight: 600; }
.user-keyword-form > textarea { border-radius: 9px; }
.diagnosis-card { max-width: 1350px; border-color: var(--polish-line); border-radius: 13px; box-shadow: var(--polish-shadow); }
.diagnosis-card h1 { color: var(--polish-ink); font-size: 22px; }
.platform-picker span, .advice-picker span { border-color: var(--polish-line-strong); border-radius: 9px; }
.platform-picker input:checked + span { border-color: var(--polish-primary); background: #5b5ce2; box-shadow: 0 7px 16px rgba(91, 92, 226, .17); }
.diagnosis-step h2 { color: #354052; font-size: 16px; }
.diagnosis-submit { height: 46px; margin-top: 32px; border-radius: 9px; }

@media (max-width: 1360px) {
  .content { padding-right: 24px; padding-left: 24px; }
  .user-content { padding-right: 18px; padding-left: 18px; }
  .user-dashboard-grid { grid-template-columns: minmax(670px, 1fr) 280px; gap: 16px; }
  .user-hero { grid-template-columns: minmax(210px, 1fr) 230px minmax(210px, 1fr); }
  .hero-orbit { width: 190px; height: 190px; }
  .hero-side { padding-right: 15px; padding-left: 15px; }
}

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:last-child { grid-column: 1 / -1; }
  .user-dashboard-grid { grid-template-columns: 1fr; }
  .user-dashboard-rail { grid-template-columns: 1fr 1fr; }
  .user-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .topbar { grid-template-columns: 58px minmax(0, 1fr) auto; }
  .wordmark { display: none; }
  .sidebar { position: fixed; z-index: 95; left: 0; width: 236px; transform: translateX(-100%); }
  .app-shell[data-sidebar="open"] .sidebar { transform: translateX(0); }
  .content, .content:not(.content-dashboard) { grid-column: 1; padding: 18px 14px 36px; }
  .topbar-actions { gap: 10px; }
  .quota-pill, .backend-link { display: none; }
  .user-shell { padding-top: 56px; padding-left: 0; }
  .user-topbar { grid-template-columns: minmax(150px, 1fr) auto; height: 56px; }
  .user-brand { font-size: 18px; }
  .user-notice { display: none; }
  .user-sidebar { display: none; }
  .user-content { padding: 14px; }
  .user-hero { grid-template-columns: 1fr; padding: 16px; }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .hero-orbit { display: none; }
  .hero-right { margin-top: 10px; }
  .user-feature-grid, .user-chart-grid, .user-dashboard-rail { grid-template-columns: 1fr; }
  .app-modal.is-maximized.user-record-modal { inset: 56px 0 0; }
}

@media (max-width: 960px) {
  .enterprise-modal .quota-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .enterprise-modal:not(.is-maximized):not(.is-minimized) {
    width: calc(100vw - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .enterprise-modal .enterprise-form .enterprise-form-body { padding: 20px 16px; }
  .enterprise-modal .enterprise-edit-quota-grid,
  .enterprise-modal .enterprise-create-quota-grid { grid-template-columns: 1fr; }
  .enterprise-modal .quota-module-grid { grid-template-columns: 1fr; }
  .enterprise-modal .quota-module-grid > label { grid-template-columns: 1fr; gap: 6px; }
  .enterprise-modal .quota-module-grid > label > span:first-child { padding: 0; text-align: left; }
  .enterprise-modal .quota-module-grid > label > small { grid-column: 1; margin-top: 0; }
}

/* User portal refinement: flatter surfaces, aligned icons and compact dialogs */
.user-portal {
  --polish-shadow: none;
  --polish-shadow-sm: none;
  --polish-shadow-lg: none;
}
.user-portal .user-topbar,
.user-portal .user-sidebar,
.user-portal .diagnosis-card,
.user-portal .user-workspace,
.user-portal .user-hero,
.user-portal .feature-card,
.user-portal .user-chart-grid > article,
.user-portal .quick-panel,
.user-portal .flow-panel,
.user-portal .quick-grid article,
.user-portal .quick-grid .quick-card,
.user-portal .app-modal,
.user-portal .user-record-modal,
.user-portal .reference-multi-select > div,
.user-portal .user-tool,
.user-portal .user-round-action,
.user-portal .primary-btn,
.user-portal .user-submit,
.user-portal .user-reset,
.user-portal .diagnosis-submit,
.user-portal .keyword-result-head b { box-shadow: none !important; }

.user-nav-arrow {
  grid-column: 4;
  display: grid;
  place-items: center;
  justify-self: end;
  width: 24px;
  height: 24px;
  margin-right: -4px;
  border-radius: 6px;
  color: #7b8495;
  transition: color .16s ease, background-color .16s ease, transform .18s ease;
}
.user-nav-arrow .ui-icon { width: 14px; height: 14px; }
.user-nav-section.open > .user-nav-item .user-nav-arrow { transform: rotate(180deg); }
.user-nav-leaf-arrow { transform: none !important; }
.user-sidebar a:hover .user-nav-arrow,
.user-sidebar button:hover .user-nav-arrow { color: #4b4dc8; background: #e9ebff; }
.user-nav-sub a { display: flex; align-items: center; }

.diagnosis-card { box-shadow: none; }
.diagnosis-card { margin-bottom: 0; }
.diagnosis-card form { padding: 24px 42px 22px; }
.diagnosis-card h1 { margin-bottom: 18px; }
.diagnosis-card .platform-picker { margin-bottom: 18px; }
.diagnosis-card .diagnosis-step { margin-top: 15px; }
.diagnosis-card .diagnosis-step h2 { margin-bottom: 9px; }
.diagnosis-card .diagnosis-step > p { margin-top: 5px; }
.diagnosis-card .diagnosis-step > textarea { min-height: 88px; }
.diagnosis-card .diagnosis-submit { margin-top: 17px; }
.platform-picker {
  grid-template-columns: repeat(8, minmax(112px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.platform-picker::-webkit-scrollbar { display: none; }
.platform-picker label { min-width: 0; }
.platform-picker .platform-option {
  box-sizing: border-box;
  justify-content: flex-start;
  gap: 9px;
  height: 56px;
  padding: 0 12px;
  border-radius: 10px;
  color: #4b5568;
  background: #fbfcfe;
}
.platform-picker .platform-option img {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border-radius: 8px;
}
.platform-picker .platform-option b { overflow: hidden; font-size: 12px; font-weight: 650; white-space: nowrap; text-overflow: ellipsis; }
.platform-picker input:checked + .platform-option {
  border-color: #7776df;
  color: #3f419e;
  background: #f0f1ff;
  box-shadow: none;
}

.user-portal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
.user-portal select,
.user-portal textarea {
  border: 1px solid #d7dde8 !important;
  border-radius: 9px !important;
  color: #344054 !important;
  background-color: #fbfcfe !important;
  box-shadow: none !important;
  outline: 0;
}
.user-portal select {
  padding-right: 36px !important;
  background-image: url("../img/icons/ui/chevron-down.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  appearance: none;
}
.user-portal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):hover,
.user-portal select:hover,
.user-portal textarea:hover { border-color: #bdc6d5 !important; background-color: #fff !important; }
.user-portal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
.user-portal select:focus,
.user-portal textarea:focus {
  border-color: #686bdd !important;
  background-color: #fff !important;
  box-shadow: none !important;
}
.user-portal input::placeholder,
.user-portal textarea::placeholder { color: #9ba5b5; opacity: 1; }
.diagnosis-step > input { height: 44px; padding: 0 14px; }
.diagnosis-step > textarea { min-height: 116px; padding: 12px 14px; line-height: 1.65; }

.user-portal .user-modal-host { background: rgba(35, 42, 60, .34); backdrop-filter: blur(2px); }
.user-portal .user-record-modal {
  width: min(980px, calc(100vw - 72px));
  height: auto;
  max-height: calc(100vh - 48px);
  border: 1px solid #dfe4ec;
  border-radius: 12px;
  overflow: hidden;
}
.user-portal .user-record-modal > header { flex: 0 0 50px; }
.user-portal .user-record-modal form {
  flex: 0 1 auto;
  max-height: calc(100vh - 98px);
  overflow: hidden;
}
.user-portal .user-record-modal form > footer,
.user-portal .keyword-tool-footer {
  flex: 0 0 58px;
  min-height: 58px;
  border-top: 1px solid #e8ecf2;
  background: #f8fafc;
}
.user-portal .user-submit,
.user-portal .user-reset { min-width: 64px; height: 36px; border-radius: 8px; }
.user-portal .user-submit { background: #5a5cd6; }
.user-portal .user-submit:hover { background: #4f51c8; transform: none; }

.user-portal .user-keyword-modal { width: min(1080px, calc(100vw - 72px)); }
.user-portal .user-keyword-form {
  gap: 14px;
  padding: 22px 34px 20px;
  overflow: auto;
}
.user-portal .user-keyword-form > label { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
.user-portal .keyword-mode-row { margin-left: 124px; }
.user-portal .user-keyword-form > textarea {
  width: calc(100% - 124px);
  height: 230px;
  min-height: 230px;
  max-height: 300px;
  margin-left: 124px;
  padding: 13px 15px;
  overflow-y: auto;
  line-height: 1.65;
  resize: vertical;
}
.user-portal .user-keyword-modal form > footer { padding-left: 158px; }
.user-portal .keyword-layer-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 4px 124px;
  padding: 11px 16px;
  border: 1px solid #dfe5fb;
  border-radius: 10px;
  background: #f6f8ff;
}
.user-portal .keyword-layer-flow span { display: inline-flex; align-items: center; gap: 7px; color: #46516c; font-size: 12px; font-weight: 700; }
.user-portal .keyword-layer-flow span b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: #5a5cd6; }
.user-portal .keyword-layer-flow i { color: #8d98b5; font-style: normal; }
.user-portal .keyword-layer-section { display: grid; gap: 9px; margin-left: 124px; }
.user-portal .keyword-layer-section > header { display: flex; align-items: baseline; gap: 10px; color: #36415a; }
.user-portal .keyword-layer-section > header b { font-size: 14px; }
.user-portal .keyword-layer-section > header small { color: #8791a3; font-size: 11px; }
.user-portal .keyword-layer-section .keyword-mode-row { margin-left: 0; }
.user-portal .keyword-layer-section > textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 112px;
  max-height: 190px;
  padding: 11px 13px;
  line-height: 1.55;
  resize: vertical;
}
.user-portal .keyword-layer-section.question-layer { padding-top: 10px; border-top: 1px dashed #dfe4ee; }

.user-portal .user-question-modal { width: min(920px, calc(100vw - 72px)); }
.user-portal .user-question-modal .reference-form-stack { gap: 17px; padding: 26px 34px 24px; overflow: visible; }
.user-portal .user-question-modal .reference-form-stack textarea { height: 260px; min-height: 260px; padding: 13px 15px; line-height: 1.65; }
.user-portal .user-question-modal form > footer { padding-left: 151px; }

.user-portal .user-resource-image-types,
.user-portal .user-resource-article-types,
.user-portal .user-image-upload-modal { width: min(760px, calc(100vw - 72px)); }
.user-portal .user-resource-image-types .user-form-grid,
.user-portal .user-resource-article-types .user-form-grid { grid-template-columns: 1fr; gap: 16px; padding: 26px 38px 24px; overflow: visible; }
.user-portal .user-resource-image-types form > footer,
.user-portal .user-resource-article-types form > footer { justify-content: flex-start; padding-left: 38px; }
.user-portal .user-image-upload-modal .image-upload-form-row { padding: 26px 38px 24px; }
.user-portal .user-image-upload-modal form > footer { padding-left: 165px; }

.user-portal .user-knowledge-modal { width: min(1200px, calc(100vw - 72px)); }
.user-portal .knowledge-form-body { gap: 16px 26px; padding: 24px 32px; }
.user-portal .knowledge-form-body > label { grid-template-columns: 128px minmax(0, 1fr); gap: 12px; }
.user-portal .knowledge-form-body > label > span { white-space: nowrap; }
.user-portal .knowledge-form-body input,
.user-portal .knowledge-form-body select,
.user-portal .knowledge-form-body .reference-multi-select > summary { min-height: 42px; padding-right: 14px; padding-left: 14px; }
.user-portal .task-form-body label > small { grid-column: 2; display: block; margin-top: -7px; white-space: nowrap; }
.user-portal .knowledge-form-body textarea { min-height: 112px; padding: 12px 14px; line-height: 1.65; }
.user-portal .knowledge-warning { border: 1px solid #ffdada; border-radius: 9px; }
.user-portal .user-knowledge-modal form > footer { padding-left: 150px; }
.user-badge.muted { color: #667085; background: #eef1f5; }
.user-badge.warning { color: #a65d00; background: #fff0d8; }
.task-instruction-summary { display: grid; gap: 3px; white-space: normal; text-align: left; line-height: 1.35; }
.task-instruction-summary small { color: #7f899a; font-size: inherit; }
.task-source-row small { flex-basis: 100%; max-width: 680px; color: #8993a5; font-size: 11px; line-height: 1.45; }
.task-form-body [data-source-section][hidden] { display: none !important; }
.task-form-body [data-source-count-note] { white-space: normal !important; line-height: 1.45; }
.writing-source-summary { display: grid; gap: 5px; justify-items: start; min-width: 0; text-align: left; }
.writing-source-summary small { display: block; max-width: 240px; overflow: hidden; color: #5f6b7d; text-overflow: ellipsis; white-space: nowrap; }
.user-portal [data-knowledge-status] { white-space: normal !important; line-height: 1.45; }

@media (max-width: 1280px) {
  .platform-picker { grid-template-columns: repeat(8, minmax(108px, 1fr)); }
  .diagnosis-card form { padding-right: 30px; padding-left: 30px; }
}
@media (max-width: 860px) {
  .user-portal .user-record-modal { width: calc(100vw - 28px); max-height: calc(100vh - 28px); }
  .user-portal .user-keyword-form > label { grid-template-columns: 1fr; }
  .user-portal .user-keyword-form > label > span { padding-top: 0; text-align: left; }
  .user-portal .keyword-mode-row,
  .user-portal .user-keyword-form > textarea { width: 100%; margin-left: 0; }
  .user-portal .keyword-layer-flow,
  .user-portal .keyword-layer-section { margin-left: 0; }
  .user-portal .keyword-layer-flow { flex-wrap: wrap; }
  .user-portal .user-keyword-modal form > footer { padding-left: 34px; }
  .user-portal .knowledge-form-body { grid-template-columns: 1fr; }
  .user-portal .knowledge-form-body > label.full,
  .user-portal .knowledge-warning { grid-column: auto; }
}

/* Archived cyan/Canglang experiment. Kept disabled so the approved blue-violet palette remains active. */
@media (max-width: 0px) and (min-width: 1px) {
/* 2026 cyan and Canglang palette — shared by admin and user portals */
:root {
  --theme-cyan: #00b7c7;
  --theme-cyan-strong: #007f8b;
  --theme-cyan-deep: #075b63;
  --theme-canglang: #b1d5c9;
  --theme-canglang-strong: #86bcae;
  --theme-canglang-soft: #e7f4f0;
  --theme-canvas: #f3f8f7;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline-color: rgba(0, 183, 199, .24);
}
::selection { color: #07373b; background: rgba(177, 213, 201, .92); }

/* Global application chrome */
.topbar,
.user-topbar {
  background: linear-gradient(105deg, #075b63 0%, #008e9b 46%, #00b7c7 100%);
}
.wordmark,
.user-brand { background: rgba(3, 65, 70, .22); }
.sidebar {
  background: linear-gradient(180deg, #075b63 0%, #064c53 52%, #053f45 100%);
}
.sidebar a.active {
  background: linear-gradient(90deg, rgba(0, 183, 199, .34), rgba(177, 213, 201, .12));
  box-shadow: inset 3px 0 var(--theme-canglang);
}
.quota-pill { border-color: rgba(177, 213, 201, .52); background: rgba(3, 65, 70, .28); }
.user-avatar { color: var(--theme-cyan-strong); }

/* Primary actions and selected states */
.primary-btn,
.user-submit,
.diagnosis-submit,
.tool-btn.refresh,
.tool-btn.sync,
.user-tool.refresh,
.user-tool.icon-only:not(.delete),
.circle-action.edit,
.user-round-action:not(.delete),
.user-badge.blue,
.user-link-button.purple,
.keyword-mode.ai,
.keyword-tool-generate {
  color: #fff;
  border-color: var(--theme-cyan-strong);
  background: linear-gradient(135deg, var(--theme-cyan-strong), var(--theme-cyan));
}
.tool-btn.add,
.user-tool.add,
.tool-btn.green,
.user-tool.green,
.user-switch.on,
.user-badge:not(.blue),
.outline-action,
.image-link {
  background-color: var(--theme-cyan);
}
.primary-btn:hover,
.user-submit:hover,
.diagnosis-submit:hover { background: linear-gradient(135deg, #006f79, #00a6b5); }
.view-btn:hover,
.search-toggle:hover,
.user-toolbar-right button:hover,
.user-toolbar-right button.active {
  border-color: var(--theme-canglang-strong);
  color: var(--theme-cyan-strong);
  background: var(--theme-canglang-soft);
}
.table-footer nav a.active,
.user-pagination [aria-current="page"] { color: #fff; background: var(--theme-cyan-strong); }

/* Forms, toggles and dialogs */
.grid-form input:focus, .grid-form select:focus, .grid-form textarea:focus,
.cloud-form input:focus, .cloud-form select:focus, .cloud-form textarea:focus,
.profile-page-form input:focus, .profile-page-form select:focus, .profile-page-form textarea:focus,
.filter-pop input:focus, .filter-pop select:focus,
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus,
.user-form-grid input:focus, .user-form-grid select:focus, .user-form-grid textarea:focus,
.reference-form-stack input:focus, .reference-form-stack select:focus, .reference-form-stack textarea:focus,
.task-form-body input:focus, .task-form-body select:focus, .task-form-body textarea:focus,
.article-form-body input:focus, .article-form-body select:focus, .article-form-body textarea:focus,
.user-keyword-form input:focus, .user-keyword-form textarea:focus,
.knowledge-form-body input:focus, .knowledge-form-body select:focus, .knowledge-form-body textarea:focus,
.user-portal input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
.user-portal select:focus,
.user-portal textarea:focus {
  border-color: var(--theme-cyan) !important;
  box-shadow: 0 0 0 3px rgba(0, 183, 199, .10) !important;
}
.app-modal > header,
.user-record-modal > header {
  background: linear-gradient(105deg, var(--theme-cyan-strong), var(--theme-cyan));
}
.modal-form footer,
.user-record-modal form > footer,
.keyword-tool-footer { background: #f3f8f7; }
.reference-radio-row span { background: #c9a7f0; }
.reference-radio-row input:checked + span { background: #6758df; }

/* Admin dashboard uses variations of the two requested hues */
.metric-card.blue { background: linear-gradient(135deg, #008c98, #00b7c7); }
.metric-card.green { background: linear-gradient(135deg, #78b5a6, #b1d5c9); color: #123f42; }
.metric-card.green small { color: rgba(18, 63, 66, .78); }
.metric-card.purple { background: linear-gradient(135deg, #007681, #5cc6c3); }
.metric-card.orange { background: linear-gradient(135deg, #5da99e, #b1d5c9); color: #123f42; }
.metric-card.orange small { color: rgba(18, 63, 66, .78); }
.metric-card.sunset { background: linear-gradient(135deg, #075b63, #86bcae); }
.stat-icon-wrap,
.metric-icon { color: var(--theme-cyan); }
.donut:not(.empty-donut) {
  background: conic-gradient(#00b7c7 0 12%, #b1d5c9 12% 38%, #008d99 38% 60%, #7ebbad 60% 75%, #43c5c5 75% 100%);
}
.deepseek { color: #00a9b8; }
.doubao { color: #86bcae; }
.yuanbao { color: #007f8b; }
.qianwen { color: #6da99c; }
.wenxin { color: #43c5c5; }
.segmented button.active { color: var(--theme-cyan-strong); background: var(--theme-canglang-soft); }
.bar-chart i:nth-child(1) { background: #00b7c7; }
.bar-chart i:nth-child(2) { background: #b1d5c9; }
.bar-chart i:nth-child(3) { background: #008d99; }
.bar-chart i:nth-child(4) { background: #7ebbad; }
.bar-chart i:nth-child(5) { background: #43c5c5; }
.stat-icon-wrap.question { color: var(--theme-cyan-strong); background: var(--theme-canglang-soft); }
.stat-icon-wrap.collected { color: #fff; background: var(--theme-canglang-strong); }
.stat-icon-wrap.platform { color: #fff; background: var(--theme-cyan); }
.stat-icon-wrap.keywords { color: #fff; background: var(--theme-cyan-strong); }

/* User navigation and content */
.user-nav-main.active,
.user-nav-item.active,
.user-nav-section.open > .user-nav-item {
  color: var(--theme-cyan-strong);
  background: var(--theme-canglang-soft);
  box-shadow: inset 3px 0 var(--theme-cyan);
}
.user-sidebar a:hover,
.user-sidebar button:hover,
.user-nav-sub a.active,
.user-nav-sub a:hover {
  color: var(--theme-cyan-strong);
  background: #eff8f5;
}
.user-nav-arrow { color: #6c8f88; }
.user-sidebar a:hover .user-nav-arrow,
.user-sidebar button:hover .user-nav-arrow { color: var(--theme-cyan-strong); background: #dff2ed; }

.platform-picker input:checked + .platform-option,
.platform-picker input:checked + span {
  border-color: var(--theme-cyan);
  color: var(--theme-cyan-deep);
  background: var(--theme-canglang-soft);
  box-shadow: none;
}
.advice-picker input:checked + span {
  border-color: var(--theme-cyan);
  color: var(--theme-cyan-strong);
  background: var(--theme-canglang-soft);
}
.feature-card small,
.feature-card > a b { background: var(--theme-cyan-strong); }
.feature-card h2,
.feature-card > a,
.user-chart-grid h2 { color: var(--theme-cyan-strong); }
.feature-card.violet,
.feature-card.mint,
.feature-card.cyan { background: linear-gradient(145deg, #fff, #eef8f5); }
.quick-grid article > span,
.quick-grid .quick-card > span,
.flow-panel li > span,
.quick-grid article.teal > span,
.quick-grid article.purple > span,
.quick-grid .purple > span,
.quick-grid article.pink > span,
.quick-grid .pink > span,
.flow-panel li > span.teal,
.flow-panel li > span.pink,
.flow-panel li > span.purple,
.flow-panel li > span.red { background: var(--theme-cyan); }
.quick-grid p b,
.user-status { color: var(--theme-cyan-strong); }
.user-status i { background: var(--theme-cyan); }

/* Subtle cyan treatment for the dashboard artwork without replacing the asset */
.user-hero {
  border-color: rgba(0, 183, 199, .28);
  background-image: linear-gradient(90deg, rgba(5, 91, 99, .80), rgba(0, 142, 155, .35) 40%, rgba(177, 213, 201, .22) 60%, rgba(5, 91, 99, .76)), url("../img/user-dashboard-ai-bg.png");
}
.hero-side > div { background: rgba(5, 91, 99, .52); }
.hero-side > div:hover { border-color: rgba(177, 213, 201, .76); background: rgba(0, 127, 139, .68); }
.hero-side > div span { color: #bdeee7; }
.hero-side > strong { background: rgba(5, 91, 99, .62); }
.hero-orbit { border-color: rgba(177, 213, 201, .34); background: radial-gradient(circle, rgba(0, 183, 199, .28), rgba(5, 91, 99, .08) 58%); }
.hero-orbit::before { border-color: rgba(177, 213, 201, .58); }
.hero-orbit > b { color: #e9fffb; text-shadow: 0 0 24px rgba(0, 183, 199, .72); }
.hero-orbit > i,
.hero-orbit > i:nth-of-type(1),
.hero-orbit > i:nth-of-type(2),
.hero-orbit > i:nth-of-type(3),
.hero-orbit > i:nth-of-type(4) { background: rgba(0, 127, 139, .92); }

/* Login screen follows the same palette */
.login-page { background: #053f45; }
.login-shell {
  background: radial-gradient(circle at 18% 25%, rgba(177, 213, 201, .34), transparent 38%), linear-gradient(135deg, #053f45 0%, #075b63 55%, #00a6b5 100%);
}
.login-brand > p:last-of-type { color: #d8efea; }
.login-card button[type="submit"] { color: #fff; background: linear-gradient(135deg, var(--theme-cyan-strong), var(--theme-cyan)); }
}
