/* A theme: inspired by the approved bright enterprise dashboard direction. */
:root {
  --primary: #5148e5;
  --primary-dark: #4037cf;
  --primary-soft: #efefff;
  --violet: #7166ee;
  --violet-soft: #f2efff;
  --success: #0da777;
  --success-soft: #e9f9f3;
  --warning: #e59416;
  --warning-soft: #fff5e2;
  --danger: #e75167;
  --danger-soft: #fff0f3;
  --ink: #172033;
  --ink-2: #394357;
  --muted: #707a8d;
  --muted-2: #9ba3b2;
  --canvas: #f5f6fa;
  --surface-2: #f8f9fc;
  --line: #e4e8ef;
  --line-strong: #d9dee8;
  --radius-md: 9px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 28, 45, .025), 0 7px 22px rgba(18, 28, 45, .035);
  --shadow-md: 0 18px 52px rgba(27, 36, 60, .13);
  --sidebar: 218px;
  --topbar: 70px;
}

body { font-family: Geist, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; }
.button { min-height: 36px; padding: 0 13px; border-radius: 8px; font-size: 12px; }
.button-primary { background: var(--primary); box-shadow: 0 6px 15px rgba(81, 72, 229, .16); }
.button-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(81, 72, 229, .22); }
.button-secondary { border-color: var(--line); }
.button-large { min-height: 47px; font-size: 14px; }
.icon-button { width: 35px; height: 35px; border-radius: 9px; }
.icon-button svg { width: 17px; height: 17px; }
.brand-mark { width: 29px; height: 29px; border-radius: 9px; box-shadow: 0 7px 18px rgba(81, 72, 229, .2); }
.brand-mark svg { width: 20px; height: 20px; }
.brand strong {
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
}
.hy-signature {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
}
.hy-signature img { display: block; width: 100%; height: 100%; }
.brand > span:last-child { min-width: 0; }
.brand > span:last-child small { font-size: 7px; font-weight: 700; letter-spacing: .16em; }

/* Login: light editorial cover with readable form and restrained motion. */
.login-body { min-height: 100vh; background: #f1f0f5; }
.login-shell {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0 clamp(24px, 4vw, 72px);
  padding: clamp(26px, 3.4vw, 54px) clamp(28px, 5vw, 88px);
  background: linear-gradient(135deg, #f7f5f1 0%, #f2f1f7 52%, #eef3f4 100%);
}
.login-shell::before,
.login-shell::after { display: none; }
.editorial-motion { position: absolute; z-index: -2; inset: 0; overflow: hidden; pointer-events: none; }
.ambient { display: block; position: absolute; border-radius: 50%; filter: blur(3px); opacity: .95; will-change: transform; }
.ambient-one { width: clamp(520px, 52vw, 940px); height: clamp(520px, 52vw, 940px); right: -20%; top: -38%; background: radial-gradient(circle at 34% 38%, rgba(118, 96, 248, .4), rgba(118, 96, 248, .13) 34%, rgba(118, 96, 248, 0) 70%); animation: editorial-drift-one 18s ease-in-out infinite alternate; }
.ambient-two { width: clamp(430px, 43vw, 760px); height: clamp(430px, 43vw, 760px); left: -18%; bottom: -40%; background: radial-gradient(circle at 56% 45%, rgba(66, 189, 157, .3), rgba(66, 189, 157, .08) 38%, rgba(66, 189, 157, 0) 70%); animation: editorial-drift-two 24s ease-in-out infinite alternate; }
.ambient-three { width: clamp(300px, 31vw, 560px); height: clamp(300px, 31vw, 560px); left: 34%; top: 30%; background: radial-gradient(circle, rgba(232, 184, 126, .17), rgba(232, 184, 126, 0) 69%); animation: editorial-drift-three 22s ease-in-out infinite alternate; }
.paper-lines { position: absolute; inset: -15%; opacity: .47; background-image: repeating-linear-gradient(112deg, transparent 0, transparent 48px, rgba(255,255,255,.82) 49px, transparent 50px); animation: editorial-lines 30s linear infinite; }
.login-masthead { z-index: 2; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding-bottom: 18px; border-bottom: 1px solid rgba(23, 32, 51, .16); }
.brand-on-color .hy-signature { width: 34px; height: 34px; flex-basis: 34px; }
.brand-on-color strong { color: var(--ink); }
.brand-on-color small { color: var(--muted); }
.edition-note { margin: 0; text-align: right; font-size: 9px; letter-spacing: .12em; }
.edition-note span, .edition-note strong { display: block; }
.edition-note span { color: var(--muted); }
.edition-note strong { margin-top: 3px; color: var(--ink); }
.login-brand-panel { grid-column: 1 / span 7; min-width: 0; position: relative; z-index: 1; display: flex; padding: 0; color: var(--ink); background: transparent; overflow: visible; pointer-events: auto; }
.login-brand-panel::before,
.login-brand-panel::after { content: none; display: none; }
.login-brand-content { width: 100%; max-width: 760px; min-height: 0; height: auto; display: flex; flex-direction: column; justify-content: center; padding: clamp(52px, 8vh, 100px) 0 32px; }
.login-copy { display: block; max-width: 740px; margin: 0; }
.login-copy .eyebrow { margin-bottom: 24px; color: var(--primary); font-size: 10px; letter-spacing: .18em; }
.login-copy h1 { max-width: 740px; margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: clamp(58px, 6.2vw, 106px); font-weight: 500; line-height: .98; letter-spacing: -.065em; }
.login-lead { max-width: 570px; margin: 30px 0 0; color: #5f6879; font-size: clamp(14px, 1.15vw, 17px); line-height: 1.85; }
.cover-index { display: flex; gap: 22px; margin-top: clamp(48px, 8vh, 92px); color: #6f7787; font-size: 10px; }
.cover-index span { padding-top: 11px; border-top: 1px solid rgba(23, 32, 51, .22); min-width: 92px; }
.login-form-panel { grid-column: 8 / -1; min-width: 0; min-height: 0; position: relative; z-index: 3; display: grid; place-items: center; padding: clamp(44px, 6vh, 76px) 0 26px; background: transparent; }
.login-form-wrap { width: min(100%, 438px); padding: clamp(30px, 3.1vw, 44px); border: 1px solid rgba(255,255,255,.94); border-radius: 4px; background: rgba(255,255,255,.79); box-shadow: 0 28px 80px rgba(50, 42, 104, .13); backdrop-filter: blur(22px); animation: editorial-form-in .75s var(--ease) both; }
.login-heading { margin-bottom: 30px; text-align: left; }
.form-kicker { margin: 0 0 13px !important; color: var(--primary) !important; font-size: 10px !important; font-weight: 700; letter-spacing: .12em; }
.login-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", "Songti SC", serif; font-size: clamp(30px, 2.7vw, 40px); font-weight: 500; letter-spacing: -.045em; }
.login-heading p:not(.form-kicker) { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.login-form > label { margin-bottom: 7px; font-size: 12px; }
.login-form > label:not(:first-child) { margin-top: 18px; }
.field-with-icon input { height: 49px; border-color: rgba(23,32,51,.16); border-radius: 6px; background: rgba(255,255,255,.72); }
.field-with-icon input:hover { border-color: rgba(23,32,51,.28); }
.field-with-icon input:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(81,72,229,.09); }
.form-meta { margin-top: 15px; font-size: 11px; }
.form-error { min-height: 20px; margin: 8px 0 5px; font-size: 11px; }
.login-form .button-large { min-height: 49px; border-radius: 6px; background: #1b1d25; box-shadow: 0 9px 24px rgba(27,29,37,.18); }
.login-form .button-large:hover { background: var(--primary); box-shadow: 0 11px 28px rgba(81,72,229,.24); }
.login-footer { margin: 25px 0 0; color: #8e95a3; text-align: left; font-size: 9px; }

@keyframes editorial-drift-one { to { transform: translate3d(-7vw, 5vh, 0) scale(1.08); } }
@keyframes editorial-drift-two { to { transform: translate3d(8vw, -5vh, 0) scale(1.13); } }
@keyframes editorial-drift-three { to { transform: translate3d(-3vw, 6vh, 0) scale(.94); } }
@keyframes editorial-lines { to { transform: translate3d(130px, 80px, 0); } }
@keyframes editorial-form-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }

/* Shared application shell. */
.sidebar { padding: 18px 13px 14px; background: rgba(251, 252, 254, .98); }
.sidebar-head { height: 42px; margin: 0 6px 18px; }
.sidebar-head .brand-copy small { display: block; margin-top: 3px; }
.sidebar-collapsed .sidebar-head .brand { display: flex; }
.sidebar-collapsed .sidebar-head .brand-copy { display: none; }
.sidebar-collapsed .sidebar-head { gap: 5px; }
.sidebar-collapsed .sidebar-head .hy-signature { flex-basis: 30px; width: 30px; height: 30px; }
.sidebar-toggle { width: 30px; height: 30px; border: 0; background: transparent; }
.nav-section { margin: 18px 10px 7px; font-size: 9px; color: #a1a8b6; }
.nav-item { min-height: 39px; margin: 2px 0; padding: 0 11px; border-radius: 9px; gap: 10px; color: #566176; font-size: 12px; }
.nav-item:hover { color: var(--primary); background: #f1f2f7; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); }
.nav-item.active::before { left: -13px; height: 20px; }
.nav-icon, .nav-icon svg { width: 17px; height: 17px; }
.nav-count { display: none; }
.sidebar-user { min-height: 54px; padding: 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.avatar { width: 33px; height: 33px; border-radius: 10px; background: var(--primary); }
.topbar { padding: 0 28px; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.topbar-actions { gap: 8px; }
.top-search { width: 220px; height: 35px; }
.top-search input { border-color: transparent; background: #f4f5f8; border-radius: 9px; font-size: 11px; }
.top-search input:focus { border-color: var(--line-strong); }
.account-chip { border-left: 1px solid var(--line); border-radius: 0; margin-left: 4px; padding-left: 15px; }
.account-chip:hover { background: transparent; }
.content { width: min(100%, 1540px); padding: 23px 28px 40px; }
.page-heading { margin-bottom: 15px; align-items: flex-end; }
.page-heading .eyebrow { display: none; }
.page-heading h1 { font-size: 20px; letter-spacing: -.025em; }
.page-heading p:not(.eyebrow) { margin-top: 5px; font-size: 11px; }
.heading-actions { gap: 8px; }
.heading-actions select { height: 36px; min-width: 125px; border-color: var(--line); border-radius: 8px; font-size: 11px; }
.card { border-radius: 14px; box-shadow: var(--shadow-sm); }
.card-head { padding: 18px 19px 14px; border-bottom: 0; }
.card-head h2 { font-size: 14px; }
.card-head p { margin-top: 4px; font-size: 10px; }
.demo-badge { display: inline-flex; margin-left: 6px; padding: 3px 6px; border-radius: 5px; color: #a66a07; background: var(--warning-soft); vertical-align: 2px; font-size: 8px; font-weight: 700; }

/* Dashboard. */
.metric-grid { gap: 13px; }
.metric-card { min-height: 124px; padding: 16px 17px; border-radius: 13px; }
.metric-card:hover { transform: translateY(-2px); }
.metric-icon { width: 34px; height: 34px; border-radius: 10px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric-card > p { margin: 13px 0 5px; font-size: 10px; }
.metric-card > strong { font-size: 27px; }
.metric-card > strong em { font-size: 11px; font-style: normal; font-weight: 600; letter-spacing: 0; }
.metric-card > small { margin-top: 7px; font-size: 9px; }
.dashboard-grid { margin-top: 15px; grid-template-columns: minmax(0, 1.85fr) minmax(300px, .75fr); gap: 15px; }
.legend { gap: 15px; font-size: 9px; }
.chart-wrap { padding: 0 18px; }
.trend-chart { height: 260px; }
.platform-card .card-head { padding-bottom: 8px; }
.donut-row { padding: 13px 19px 15px; gap: 18px; }
.donut { width: 108px; height: 108px; background: conic-gradient(var(--primary) 0 24%, var(--violet) 24% 42%, #22b78c 42% 60%, #35a3e6 60% 78%, #ef9c33 78% 90%, #8d96aa 90% 100%); }
.donut::after { inset: 11px; }
.donut strong { font-size: 22px; }
.platform-list { padding: 0 19px 17px; gap: 9px; }
.platform-list > div { font-size: 10px; }
.bottom-grid { margin-top: 15px; gap: 15px; }
.performance-list { padding: 2px 19px 10px; }
.performance-list > div { min-height: 58px; grid-template-columns: 28px 140px 1fr 46px 40px; }
.recent-list { padding: 1px 19px 10px; }
.recent-list a { min-height: 58px; }
.recent-list strong { font-size: 11px; }
.recent-list small { font-size: 8px; }

/* Records. */
.records-content { width: min(100%, 1580px); }
.filter-card { margin-bottom: 13px; padding: 14px 15px; }
.filter-grid { grid-template-columns: 140px 140px 140px 135px minmax(220px, 1fr) auto; gap: 8px; }
.filter-grid label > span { margin-bottom: 5px; font-size: 9px; }
.filter-grid select, .filter-grid input { height: 36px; border-color: var(--line); border-radius: 8px; font-size: 10px; }
.filter-actions { gap: 3px; }
.table-toolbar { min-height: 56px; padding: 9px 14px; }
.result-count { font-size: 10px; }
.table-scroll { min-height: 435px; }
.data-table { min-width: 1280px; }
.data-table th { height: 43px; padding: 0 11px; font-size: 9px; background: #f7f8fb; }
.data-table td { height: 64px; padding: 10px 11px; font-size: 10px; }
.table-footer { min-height: 55px; padding: 10px 14px; }
.table-footer p { font-size: 10px; }
.page-button { min-width: 29px; height: 29px; border-radius: 7px; font-size: 10px; }
.modal { border-radius: 16px; }
.modal-head { padding: 18px 20px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 19px; }
.detail-block { padding: 12px; border-radius: 9px; }
.toast { border-radius: 10px; }

@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .platform-card { display: grid; grid-template-columns: 1fr 1.25fr; align-items: center; }
  .platform-card .card-head { grid-column: 1 / -1; }
  .platform-list { padding-top: 13px; }
}

@media (max-width: 1280px) {
  .filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filter-search { grid-column: span 3; }
}

@media (max-width: 1100px) {
  .login-shell { min-height: 100vh; overflow-y: auto; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; padding: 24px clamp(22px, 6vw, 58px) 42px; }
  .login-masthead { grid-column: 1; }
  .login-brand-panel { display: flex; grid-column: 1; }
  .login-brand-content { max-width: 720px; padding: 72px 0 26px; }
  .login-copy h1 { font-size: clamp(50px, 8vw, 78px); }
  .login-lead { max-width: 610px; }
  .cover-index { margin-top: 38px; }
  .login-form-panel { grid-column: 1; padding: 18px 0 24px; place-items: start; }
  .login-form-wrap { width: min(100%, 520px); }
  .top-search { display: none; }
}

@media (max-width: 720px) {
  .login-shell { padding: 18px 18px 30px; }
  .login-masthead { min-height: 42px; padding-bottom: 14px; }
  .login-masthead .brand small, .edition-note span { display: none; }
  .edition-note { font-size: 8px; }
  .login-brand-content { padding: 56px 0 20px; }
  .login-copy .eyebrow { margin-bottom: 16px; font-size: 8px; }
  .login-copy h1 { font-size: clamp(43px, 13vw, 62px); line-height: 1; }
  .login-lead { margin-top: 20px; font-size: 13px; line-height: 1.7; }
  .cover-index { display: none; }
  .login-form-panel { padding-top: 14px; }
  .login-form-wrap { padding: 29px 22px 23px; }
  .ambient-one { right: -55%; top: -18%; }
  .ambient-two { left: -55%; bottom: -14%; }
  .ambient-three { display: none; }
  .content { padding: 18px 16px 30px; }
  .topbar { padding: 0 15px; }
  .page-heading { align-items: stretch; }
  .heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .heading-actions > * { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-motion *, .login-form-wrap { animation: none !important; transform: none !important; }
}
