:root {
  --bg: #f3f8ff;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-tint: #eef5ff;
  --ink: #101923;
  --ink-soft: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #dbe3ea;
  --line-strong: #c7d2de;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf2ff;
  --accent: #f5b82e;
  --accent-soft: #fff4cf;
  --danger: #b42318;
  --danger-soft: #fff0ed;
  --warning: #b7791f;
  --warning-soft: #fff6d8;
  --ok: #16794a;
  --ok-soft: #e9f7ef;
  --violet: #6d5bd0;
  --violet-soft: #f1efff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 34px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar: #081f3f;
  --sidebar-2: #0c3b78;
  --sidebar-text: #edf6ff;
  --sidebar-muted: #afc4df;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* Blue Sunrise theme: brighter blue-gold atmosphere and refined flourishes */
body {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 205, 92, .18), transparent 28%),
    radial-gradient(circle at 14% 16%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #eef7ff 0%, #f8fbff 48%, #fff8df 100%);
}

.login-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 211, 105, .34), transparent 30%),
    radial-gradient(circle at 24% 16%, rgba(72, 141, 255, .32), transparent 34%),
    linear-gradient(135deg, #eaf5ff 0%, #f7fbff 48%, #fff2bf 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 28%, rgba(37, 99, 235, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 42%, rgba(245, 184, 46, .16) 0 2px, transparent 3px);
  background-size: 64px 64px, 92px 92px;
  animation: bluegold-drift 18s linear infinite;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(255, 195, 57, .28) 23%, transparent 31%),
    linear-gradient(145deg, transparent 0 55%, rgba(37, 99, 235, .12) 56%, transparent 64%),
    repeating-linear-gradient(132deg, transparent 0 36px, rgba(255, 209, 102, .12) 37px, transparent 39px);
  animation: sunrise-flow 8s cubic-bezier(.16,1,.3,1) infinite alternate;
}

.login-card {
  border-color: rgba(255, 218, 111, .48);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82)),
    rgba(255,255,255,.86);
  box-shadow:
    0 34px 90px rgba(29, 78, 216, .16),
    0 1px 0 rgba(255,255,255,.88) inset,
    0 0 0 1px rgba(37, 99, 235, .06);
  backdrop-filter: blur(18px);
}

.login-card::before {
  background:
    linear-gradient(120deg, transparent 0 30%, rgba(255, 221, 128, .52) 43%, transparent 58%),
    linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(245, 184, 46, .12));
}

.login-card::after {
  background: linear-gradient(90deg, transparent, #2563eb, #f5b82e, transparent);
}

.login-card .brand-mark,
.brand-mark {
  background: linear-gradient(135deg, #d9eaff 0%, #ffffff 48%, #ffe28a 100%);
  color: #0b2a55;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .22);
}

.sidebar {
  background:
    radial-gradient(circle at 22% 6%, rgba(255, 205, 92, .18), transparent 28%),
    linear-gradient(180deg, #0d3a76 0%, #071b36 52%, #061426 100%);
  border-right-color: rgba(255, 255, 255, .12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, transparent 0 32%, rgba(255, 215, 104, .10) 33%, transparent 38%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.025) 35px, transparent 36px);
}

.brand,
.nav-list {
  position: relative;
  z-index: 1;
}

.brand {
  border-bottom-color: rgba(255, 255, 255, .13);
}

.nav-item {
  color: #d7e8fb;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .09);
}

.nav-item.active {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,247,255,.94));
  color: #0b2a55;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .20), 0 1px 0 rgba(255,255,255,.95) inset;
}

.nav-item.active::before {
  background: linear-gradient(180deg, #f5b82e, #ffe28a);
  box-shadow: 0 0 18px rgba(245, 184, 46, .45);
}

.main {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 5%, rgba(255, 213, 102, .20), transparent 26%),
    radial-gradient(circle at 18% 10%, rgba(37, 99, 235, .10), transparent 30%),
    linear-gradient(135deg, rgba(239, 247, 255, .92), rgba(255,255,255,.78) 48%, rgba(255, 248, 222, .52));
}

.main::before,
.main::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.main::before {
  inset: 0;
  background:
    repeating-linear-gradient(128deg, transparent 0 42px, rgba(245, 184, 46, .085) 43px, transparent 45px),
    radial-gradient(circle at 84% 19%, rgba(37, 99, 235, .08) 0 1px, transparent 2px);
  background-size: auto, 56px 56px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%);
}

.main::after {
  right: -110px;
  top: 86px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(245, 184, 46, .22);
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle, rgba(255, 225, 143, .24), transparent 54%),
    conic-gradient(from 120deg, rgba(37,99,235,.10), rgba(245,184,46,.18), rgba(37,99,235,.08));
  animation: bluegold-orbit 18s linear infinite;
}

.main > * {
  position: relative;
  z-index: 1;
}

.panel,
.filter-bar,
.quick-strip,
.analytics-note,
.analytics-card,
.analytics-summary-card,
.task-card,
.record-item,
.draft-row,
.owner-card {
  border-color: rgba(178, 201, 230, .82);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(250,253,255,.86));
  box-shadow:
    0 14px 32px rgba(37, 99, 235, .055),
    0 1px 0 rgba(255,255,255,.9) inset;
}

.today-insight-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(237,246,255,.82) 50%, rgba(255,246,213,.72)),
    #fff;
}

.today-insight-panel::after {
  background:
    radial-gradient(circle, rgba(255,215,104,.24) 0 34%, transparent 36%),
    conic-gradient(from 140deg, rgba(37,99,235,.22), rgba(245,184,46,.28), rgba(37,99,235,.18));
}

.primary-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.ghost-button,
.mini-button,
.user-switcher {
  border-color: rgba(178, 201, 230, .9);
}

textarea:focus,
input:focus,
select:focus,
.multi-select-trigger:focus {
  border-color: rgba(37, 99, 235, .74);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 0 0 1px rgba(245, 184, 46, .10) inset;
}

select.filter-active {
  border-color: rgba(37, 99, 235, .72);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.user-label {
  background: linear-gradient(135deg, #eaf2ff, #fff4cf);
}

.user-label svg {
  stroke: #2563eb;
}

.panel-head h3::before,
.analytics-card-head h3::before {
  background: linear-gradient(135deg, #eaf2ff, #fff7da);
  color: #1d4ed8;
}

.task-card::before,
.task-item::before {
  background: linear-gradient(180deg, #2563eb, #f5b82e);
}

.priority-P1,
.flag-production {
  background: var(--warning-soft);
  color: #a16207;
}

.analytics-bar-track span.brand,
.today-module-row i {
  background: linear-gradient(90deg, #2563eb, #f5b82e);
}

@keyframes bluegold-drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(58px, -34px, 0); }
}

@keyframes sunrise-flow {
  from { opacity: .62; transform: translateX(-1.5%); }
  to { opacity: .92; transform: translateX(1.5%); }
}

@keyframes bluegold-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .main::after {
    width: 260px;
    height: 260px;
    right: -120px;
    top: 140px;
  }

  .login-screen {
    background:
      radial-gradient(circle at 70% 12%, rgba(255, 211, 105, .32), transparent 30%),
      linear-gradient(180deg, #eaf5ff 0 42%, #fff8df 100%);
  }
}

/* Final final tab color lock */
#infoView .settings-tabs {
  border-bottom-color: rgba(178, 201, 230, .82) !important;
}

#infoView .settings-tab {
  color: #5f7190 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#infoView .settings-tab:hover {
  color: #1d4ed8 !important;
  background: rgba(255, 255, 255, .72) !important;
}

#infoView .settings-tab.active {
  color: #174ea6 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,247,255,.94)) !important;
  box-shadow:
    inset 0 -3px 0 #f5b82e,
    0 10px 22px rgba(37, 99, 235, .08) !important;
}

/* Global blue-gold color lock */
:root {
  --bg: #f3f8ff;
  --surface-tint: #eef5ff;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf2ff;
  --accent: #f5b82e;
  --accent-soft: #fff4cf;
  --sidebar: #081f3f;
  --sidebar-2: #0c3b78;
  --sidebar-text: #edf6ff;
  --sidebar-muted: #afc4df;
}

.settings-tabs,
.analysis-tabs,
.tab-bar {
  border-color: rgba(178, 201, 230, .82) !important;
}

.settings-tab,
.analysis-tab,
.tab-item {
  color: #5f7190 !important;
}

.settings-tab:hover,
.analysis-tab:hover,
.tab-item:hover {
  color: #1d4ed8 !important;
}

.settings-tab.active,
.analysis-tab.active,
.tab-item.active {
  color: #174ea6 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,247,255,.94)) !important;
  box-shadow:
    inset 0 -3px 0 #f5b82e,
    0 10px 22px rgba(37, 99, 235, .08) !important;
}

.analytics-note strong,
.priority-P2,
.flag-launch,
.contact-name-button {
  color: #1d4ed8 !important;
}

.legend-P2 i {
  background: #2563eb !important;
}

.analytics-bar-track span.brand,
.today-module-row i {
  background: linear-gradient(90deg, #2563eb, #f5b82e) !important;
}

/* Information entry spacing and surface cleanup */
#infoView .quick-strip {
  align-items: stretch;
  gap: 14px;
  padding: 12px;
  margin-bottom: 16px !important;
  border: 1px solid rgba(178, 201, 230, .82);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255,255,255,.62), rgba(237,246,255,.62) 52%, rgba(255,246,213,.36));
  box-shadow: 0 12px 26px rgba(37, 99, 235, .05);
}

#infoView .quick-strip > div {
  align-items: stretch !important;
}

#infoView .quick-strip textarea {
  min-height: 58px;
  background: rgba(255, 255, 255, .78);
}

#infoView .quick-strip .ghost-button {
  min-width: 120px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(239,247,255,.86));
}

#infoTab_meetingInput .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

#infoTab_meetingInput #meetingContent {
  display: block;
  margin-top: 0;
}

#infoTab_quickInput > .panel + .panel {
  margin-top: 18px;
}

#infoTab_quickInput > .panel {
  overflow: hidden;
}

#infoTab_quickInput .panel-head {
  margin-top: 0;
}

#draftList {
  padding-top: 2px;
}

#infoTab_meetingInput .form-actions,
#infoTab_quickInput .form-actions {
  margin-top: 18px;
}

#infoTab_meetingInput > .panel + .panel {
  margin-top: 22px;
}

#infoTab_meetingInput .panel:first-child,
#infoTab_quickInput .panel:first-of-type {
  padding-bottom: 22px;
}

.processing-overlay {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 18px) scale(.98);
  transition: opacity .22s ease, transform .22s cubic-bezier(.16,1,.3,1);
}

.processing-overlay.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.processing-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 270px;
  padding: 14px 16px;
  border: 1px solid rgba(178, 201, 230, .92);
  border-radius: 14px;
  color: #10213a;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(239,247,255,.94) 56%, rgba(255,246,213,.88));
  box-shadow:
    0 22px 54px rgba(37, 99, 235, .18),
    0 1px 0 rgba(255,255,255,.95) inset;
  backdrop-filter: blur(16px);
}

.processing-spinner {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #2563eb, #f5b82e, rgba(37,99,235,.18), #2563eb);
  animation: processing-spin .9s linear infinite;
}

.processing-spinner::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(178,201,230,.5) inset;
}

.processing-card strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
}

.processing-card em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.is-processing {
  opacity: .72;
}

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

@media (max-width: 640px) {
  #infoView .quick-strip {
    grid-template-columns: 1fr;
  }

  #infoView .quick-strip .ghost-button {
    width: 100%;
  }

  #infoTab_meetingInput .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .processing-overlay {
    left: 14px;
    right: 14px;
    bottom: 18px;
    transform: translateY(18px) scale(.98);
  }

  .processing-overlay.show {
    transform: translateY(0) scale(1);
  }

  .processing-card {
    min-width: 0;
    width: 100%;
  }
}

/* Blue-gold tab polish */
.tab-bar,
.settings-tabs {
  border-bottom-color: rgba(178, 201, 230, .82);
}

.tab-item,
.settings-tab,
.analysis-tab {
  color: #5f7190;
}

.tab-item:hover,
.settings-tab:hover,
.analysis-tab:hover {
  color: #1d4ed8;
  background: rgba(255, 255, 255, .72);
}

.tab-item.active,
.settings-tab.active,
.analysis-tab.active {
  color: #174ea6;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,247,255,.94));
  box-shadow:
    inset 0 -3px 0 #f5b82e,
    0 10px 22px rgba(37, 99, 235, .08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(230, 244, 241, 0.78), rgba(244, 246, 248, 0) 300px),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app-shell {
  display: none;
}

body.auth-ready .login-screen {
  display: none;
}

.login-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(245, 184, 46, 0.12)),
    var(--bg);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-lg);
}

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

.login-brand h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.login-brand p,
.login-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

::selection {
  background: rgba(245, 184, 46, 0.26);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.22), rgba(245, 184, 46, 0.08) 260px),
    var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 22px;
  padding: 8px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #b8efe5, #ffffff);
  color: #083b37;
  font-size: 18px;
  font-weight: 850;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.brand h1 {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 780;
  line-height: 1.25;
}

.brand p {
  margin: 4px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  position: relative;
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #cfdae6;
  padding: 0 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.nav-item.active {
  background: #ffffff;
  color: #10202c;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 10px;
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: #43d6bd;
}

.main {
  min-width: 0;
  padding: 28px clamp(20px, 3vw, 38px) 38px;
}

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

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.topbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.2;
}

.top-actions,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.user-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 7px 4px 10px;
  box-shadow: var(--shadow-sm);
}

.user-label {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 13px;
}

.user-switcher select {
  width: auto;
  max-width: 128px;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 2px;
  box-shadow: none;
}

.primary-button,
.ghost-button,
.icon-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  min-height: 38px;
  padding: 0 14px;
  font-weight: 720;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
}

.primary-button {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.primary-button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.ghost-button,
.mini-button {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.ghost-button:hover,
.mini-button:hover {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
}

.ghost-button.danger,
.mini-button.danger {
  color: var(--danger);
  border-color: #fac7be;
  background: #fffafa;
}

.ghost-button.danger:hover,
.mini-button.danger:hover {
  background: var(--danger-soft);
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  background: var(--surface-soft);
  color: var(--muted);
  border-color: var(--line);
  font-size: 20px;
  box-shadow: none;
}

.icon-button:hover {
  color: var(--ink);
  background: #ffffff;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

textarea,
input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 11px;
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  line-height: 1.55;
}

textarea::placeholder,
input::placeholder {
  color: #a2afbd;
}

textarea:focus,
input:focus,
select:focus,
.multi-select-trigger:focus {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

select.filter-active {
  border-color: rgba(37, 99, 235, 0.7);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 760;
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 720;
}

.view {
  display: none;
}

.active-view {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.quick-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.quick-strip textarea {
  min-height: 54px;
  resize: vertical;
}

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

.summary-item,
.panel,
.module-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 227, 234, 0.92);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.summary-item {
  padding: 16px;
}

.summary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

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

.panel {
  min-width: 0;
  padding: 16px;
}

.wide-panel {
  min-height: 240px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 780;
  line-height: 1.25;
}

.panel-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 24px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 760;
}

.task-stack,
.record-list,
.rule-list {
  display: grid;
  gap: 10px;
}

.task-card,
.task-item,
.draft-row,
.record-item,
.owner-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.task-card,
.task-item {
  position: relative;
  padding: 12px;
  overflow: hidden;
}

.task-card {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.task-card::before,
.task-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--brand);
}

.task-card.overdue::before,
.task-item.p0::before {
  background: var(--danger);
}

.task-card.due-soon::before,
.task-item.p1::before {
  background: var(--warning);
}

.task-card-head,
.task-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
  line-height: 1.4;
}

.task-title {
  display: inline;
}

.task-card-meta,
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.task-card-flags,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.task-card-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.task-card-adjust {
  min-height: 28px;
  background: var(--surface-soft);
}

.today-command-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.today-insight-panel {
  position: relative;
  margin-bottom: 16px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(235,248,246,.74) 52%, rgba(240,245,255,.78)),
    #fff;
}

.today-insight-panel::after {
  content: "";
  position: absolute;
  right: -84px;
  top: -120px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(37,99,235,.16), transparent 58%),
    conic-gradient(from 130deg, rgba(37,99,235,.16), rgba(245,184,46,.22), rgba(180,35,24,.12), rgba(37,99,235,.16));
  opacity: .76;
  animation: risk-orbit 9000ms linear infinite;
}

.today-insight-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.15fr 1.25fr;
  gap: 14px;
}

.today-orbital-card,
.today-risk-console,
.today-status-card,
.today-module-card {
  min-width: 0;
  border: 1px solid rgba(199, 210, 222, .78);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,252,253,.82));
  box-shadow: 0 16px 36px rgba(15, 23, 42, .08), 0 1px 0 rgba(255,255,255,.9) inset;
}

.today-orbital-card {
  display: grid;
  place-items: center;
  gap: 12px;
}

.orbital-ring {
  width: 154px;
  height: 154px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .12), 0 0 0 10px rgba(255,255,255,.62) inset;
  animation: card-enter-rich 520ms cubic-bezier(.16,1,.3,1) both;
}

.orbital-ring::before {
  content: "";
  position: absolute;
  inset: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.96), rgba(248,252,253,.94));
  box-shadow: 0 0 0 1px rgba(199, 210, 222, .72) inset;
}

.orbital-ring > div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 2px;
}

.orbital-ring strong {
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
}

.orbital-ring span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.priority-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.priority-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.priority-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-P0 i { background: #b42318; }
.legend-P1 i { background: #b54708; }
.legend-P2 i { background: #2563eb; }
.legend-P3 i { background: #6d5bd0; }

.today-risk-console {
  color: #fff;
  border-color: rgba(255,255,255,.16);
  background:
    radial-gradient(circle at 78% 10%, rgba(255,255,255,.18), transparent 34%),
    linear-gradient(145deg, #1b1111, #7f1d1d 48%, #b42318);
}

.console-head,
.status-score,
.module-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.console-head span,
.status-score span,
.module-card-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 820;
}

.today-risk-console .console-head span,
.today-risk-console .risk-signal-grid span {
  color: rgba(255,255,255,.76);
}

.console-head strong {
  font-size: 30px;
}

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

.risk-signal-grid div {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.09);
  box-shadow: 0 1px 0 rgba(255,255,255,.16) inset;
}

.risk-signal-grid strong {
  font-size: 24px;
  line-height: 1;
}

.risk-signal-grid span {
  font-size: 12px;
  font-weight: 760;
}

.status-score strong,
.module-card-title strong {
  color: var(--brand-dark);
  font-size: 24px;
}

.today-module-bars {
  display: grid;
  gap: 10px;
}

.today-module-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.today-module-row span {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.today-module-row strong {
  color: var(--ink);
  font-size: 13px;
}

.today-module-row div {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef4;
}

.today-module-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #f5b82e);
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
}

.today-empty-state {
  display: grid;
  gap: 6px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  text-align: center;
}

.today-empty-state strong {
  font-size: 18px;
}

.today-empty-state span,
.dialog-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

#bulkCompleteDialog {
  width: min(760px, calc(100vw - 28px));
}

.bulk-complete-form {
  width: 100%;
}

.bulk-complete-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 2px;
}

.bulk-complete-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8fbfd);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1), border-color .2s ease, box-shadow .2s ease;
}

.bulk-complete-item:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.bulk-complete-item input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.bulk-complete-item span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.bulk-complete-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.bulk-complete-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

#taskTable a,
#recordTable a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 820;
  border-bottom: 0;
}

#taskTable a:hover,
#recordTable a:hover {
  color: var(--brand-dark);
  text-decoration: none;
}

.pill,
.badge,
.record-kind,
.chip,
.chip-list span,
.rule-list p {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 740;
  line-height: 1.25;
}

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

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

.priority-P0 { background: var(--danger-soft); color: var(--danger); }
.priority-P1 { background: var(--warning-soft); color: var(--warning); }
.priority-P2 { background: var(--brand-soft); color: var(--brand-dark); }
.priority-P3 { background: var(--surface-soft); color: var(--ok); }

.status-待处理 { background: var(--violet-soft); color: var(--violet); }
.status-进行中 { background: var(--accent-soft); color: var(--accent); }
.status-等待反馈 { background: var(--warning-soft); color: var(--warning); }
.status-已完成 { background: var(--ok-soft); color: var(--ok); }

.flag-leader { background: #fff0f6; color: #b83280; }
.flag-blocker { background: var(--danger-soft); color: var(--danger); }
.flag-production { background: var(--warning-soft); color: var(--warning); }
.flag-launch { background: var(--brand-soft); color: var(--brand-dark); }

.status-risk {
  color: var(--danger);
}

.status-watch {
  color: var(--warning);
}

.status-normal {
  color: var(--ok);
}

.table-wrap {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

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

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

tr:last-child td {
  border-bottom: 0;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: #f8fbfd;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}

td strong {
  color: var(--ink);
}

input[type="checkbox"] {
  width: 16px;
  min-height: 16px;
  accent-color: var(--brand);
  box-shadow: none;
}

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

.filter-bar {
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.filter-bar label {
  display: grid;
  grid-template-rows: 20px 42px;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  min-width: 0;
}

.filter-bar input,
.filter-bar select {
  height: 42px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.form-grid {
  align-items: start;
}

.form-grid > label {
  display: grid;
  grid-template-rows: 22px 42px;
  gap: 6px;
  line-height: 22px;
  min-width: 0;
}

.form-grid > label > input,
.form-grid > label > select,
.form-grid > label > .multi-select {
  height: 42px;
  min-height: 42px;
}

.form-grid > label > input,
.form-grid > label > select {
  padding-top: 0;
  padding-bottom: 0;
}

.form-grid > label .multi-select-trigger {
  display: flex;
  align-items: center;
  height: 42px;
  min-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
}

.records-filter {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.large-input {
  min-height: 190px;
  resize: vertical;
}

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

.draft-row {
  display: grid;
  gap: 10px;
  padding: 14px;
}

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

.draft-line input,
.draft-line select,
.draft-line textarea {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.draft-ops {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

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

.module-card {
  padding: 15px;
  text-align: left;
}

.module-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.module-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.module-stats strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.report-output {
  min-height: 420px;
  margin-top: 12px;
  line-height: 1.7;
  font-size: 14px;
}

.analysis-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.analysis-tab {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  padding: 0 14px;
  font-weight: 760;
}

.analysis-tab.active {
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.analysis-tab-panel {
  min-width: 0;
}

.analytics-note {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analytics-note strong {
  color: var(--brand-dark);
}

.analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.analytics-summary-card {
  min-height: 126px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.analytics-summary-card span,
.analytics-summary-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 720;
}

.analytics-summary-card strong {
  display: block;
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1;
}

.analytics-summary-card.danger strong { color: var(--danger); }
.analytics-summary-card.warning strong { color: var(--warning); }
.analytics-summary-card.brand strong { color: var(--brand-dark); }

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

.analytics-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.analytics-card.wide {
  grid-column: span 1;
}

.analytics-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.analytics-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.analytics-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.analytics-bar-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.analytics-bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 720;
}

.analytics-bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.analytics-bar-track span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--accent);
}

.analytics-bar-track span.brand { background: var(--brand); }
.analytics-bar-track span.ok { background: var(--ok); }
.analytics-bar-track span.warning { background: var(--warning); }
.analytics-bar-track span.danger { background: var(--danger); }

.module-load-list,
.analytics-timeline {
  display: grid;
  gap: 12px;
}

.module-load-item {
  display: grid;
  gap: 7px;
}

.module-load-item strong {
  color: var(--ink);
}

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

.analytics-timeline button {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
  text-align: left;
}

.analytics-timeline button:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.analytics-timeline span,
.analytics-timeline em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.analytics-timeline strong {
  color: var(--ink);
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 20px;
}

.tab-bar,
.settings-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab-item,
.settings-tab {
  border: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 740;
  white-space: nowrap;
}

.tab-item:hover,
.settings-tab:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

.tab-item.active,
.settings-tab.active {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: inset 0 -2px 0 var(--brand);
}

.tab-content,
.settings-tab-content {
  display: none;
  min-width: 0;
}

.tab-content.active,
.settings-tab-content.active {
  display: block;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.task-tab-panel,
#settingsModulesTable,
#settingsTypesTable,
#settingsTagsTable {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

.settings-table th,
.settings-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.settings-table td input,
.settings-table td select {
  min-width: 80px;
  padding: 6px 8px;
  font-size: 13px;
}

.settings-table-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.settings-add-row,
.setting-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.settings-add-row {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: var(--radius);
  border: 1px dashed var(--line-strong);
}

.setting-input-row {
  margin-bottom: 12px;
}

.setting-input-row input {
  flex: 1;
  min-width: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.chip-list span,
.rule-list p {
  margin: 0;
  border-color: var(--line);
  background: #ffffff;
}

dialog {
  width: min(900px, calc(100vw - 28px));
  max-height: min(88vh, 980px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.task-form {
  display: grid;
  gap: 14px;
  max-height: min(88vh, 980px);
  overflow-y: auto;
  padding: 18px;
  background: #ffffff;
}

.dialog-head {
  position: sticky;
  top: -18px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.dialog-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 780;
}

.flag-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.flag-section h4 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

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

.flag-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 10px;
  background: #ffffff;
  font-weight: 650;
}

.timeline {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.record-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.record-kind {
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12px;
}

.record-kind.follow {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.record-kind.status {
  background: var(--warning-soft);
  color: var(--warning);
}

.record-kind.meeting {
  background: var(--violet-soft);
  color: var(--violet);
}

.record-body strong {
  display: block;
  margin-bottom: 5px;
}

.record-body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.record-time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  max-width: min(380px, calc(100vw - 44px));
  transform: translateY(130px);
  transition: transform 0.22s ease;
  background: #111827;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
}

.toast.show {
  transform: translateY(0);
}

.empty {
  margin: 0;
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  text-align: center;
}

.multi-select {
  position: relative;
}

.multi-select-trigger {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  min-height: 38px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 200;
  max-height: 260px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.multi-select-dropdown.open {
  display: block;
}

.multi-select-dropdown label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.multi-select-dropdown label:hover {
  background: var(--surface-soft);
}

.change-log-table {
  margin-top: 8px;
}

.change-log-mobile {
  display: none;
}

.beian-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--line);
  z-index: 100;
}

.beian-footer a {
  color: var(--muted);
  text-decoration: none;
}

.beian-footer a:hover {
  color: var(--brand);
}

.change-log-table table {
  min-width: 620px;
  font-size: 12px;
}

.change-log-table th,
.change-log-table td {
  padding: 7px 8px;
  font-size: 12px;
}

.change-log-table .log-time {
  color: var(--muted);
  white-space: nowrap;
}

.change-log-table .log-note {
  color: var(--ink-soft);
  max-width: 220px;
}

.change-log-table .log-changes {
  color: var(--muted);
}

.change-log-table .log-changes .change-item {
  display: inline-block;
  margin-right: 8px;
}

.change-log-table .log-changes .old-val {
  color: var(--danger);
  text-decoration: line-through;
}

.change-log-table .log-changes .new-val {
  color: var(--ok);
}

.owner-card {
  padding: 14px;
  margin-bottom: 12px;
}

.owner-card-header {
  margin-bottom: 10px;
}

.owner-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.owner-form-group {
  display: grid;
  gap: 6px;
}

.owner-form-group label {
  color: var(--muted);
}

.owner-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.module-contact-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.module-contact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-contact-head h4 {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.module-contacts-list {
  display: grid;
  gap: 10px;
}

.module-contact-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.contact-name-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contact-name-button {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 740;
}

.contact-name-button:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: linear-gradient(135deg, #eaf2ff, #fff4cf);
}

.contact-card-popover {
  position: fixed;
  z-index: 100000;
  display: none;
  width: min(280px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.contact-card-popover.show {
  display: grid;
  gap: 8px;
}

.contact-card-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.contact-card-module {
  color: var(--muted);
  font-size: 12px;
  margin-top: -4px;
}

.contact-card-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.contact-card-row strong {
  color: var(--ink-soft);
  font-weight: 700;
  word-break: break-all;
}

.analysis-result {
  color: var(--ink-soft);
  line-height: 1.65;
}

.analysis-result h2,
.analysis-result h3,
.analysis-result h4,
.analysis-result h5,
.analysis-result h6 {
  margin: 12px 0 6px;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: 0;
}

.analysis-result h2 { font-size: 17px; }
.analysis-result h3 { font-size: 15px; }
.analysis-result h4,
.analysis-result h5,
.analysis-result h6 { font-size: 13px; }

.analysis-result p {
  margin: 7px 0;
}

.analysis-result ul,
.analysis-result ol {
  margin: 7px 0;
  padding-left: 20px;
}

.analysis-result li {
  margin: 4px 0;
}

.analysis-result blockquote {
  margin: 8px 0;
  padding: 8px 10px;
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  color: var(--ink-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.analysis-result code {
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #be185d;
}

.analysis-result pre {
  margin: 8px 0;
  padding: 10px;
  overflow-x: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius);
}

.analysis-result pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.analysis-result hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}

.analysis-result strong {
  color: var(--brand-dark);
}

.analysis-result a {
  color: var(--accent);
}

@media (max-width: 1180px) {
  .analytics-summary-grid,
  .analytics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-card.wide {
    grid-column: span 1;
  }

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

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

@media (max-width: 1024px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .brand {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

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

  .nav-item {
    text-align: center;
  }

  .nav-item.active::before {
    display: none;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    padding: 20px 16px 28px;
    overflow-x: hidden;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .workbench-grid,
  .quick-strip {
    grid-template-columns: 1fr;
  }

  .view,
  .active-view,
  .panel,
  .info-tab-panel,
  .task-tab-panel,
  .analysis-tab-panel,
  .quick-strip,
  .form-grid,
  .filter-bar,
  .form-actions,
  .large-input,
  textarea,
  input,
  select {
    max-width: 100%;
    min-width: 0;
  }

  .form-actions,
  .quick-strip > div {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions > button,
  .quick-strip button {
    width: 100%;
  }

  dialog {
    width: min(92vw, 900px);
    max-width: 92vw;
  }

  .task-form {
    max-width: 100%;
    overflow-x: hidden;
  }

  .table-wrap,
  #settingsModulesTable,
  #settingsTypesTable,
  #settingsTagsTable {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 13px;
  }

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

  .summary-grid,
  .module-grid,
  .module-contact-row,
  .analytics-summary-grid,
  .analytics-grid,
  .filter-bar,
  .form-grid,
  .flag-grid,
  .settings-grid,
  .owner-form-row {
    grid-template-columns: 1fr;
  }

  .analytics-note {
    grid-template-columns: 1fr;
  }

  .analytics-card.wide {
    grid-column: span 1;
  }

  .analytics-tabs {
    width: 100%;
  }

  .analysis-tab {
    flex: 1;
  }

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

  .top-actions,
  .form-actions,
  .settings-add-row,
  .setting-input-row,
  .draft-line {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .ghost-button,
  .mini-button {
    width: 100%;
  }

  .user-switcher {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  .user-switcher select {
    flex: 1 1 0%;
    max-width: none;
    width: 0;
    min-width: 0;
  }

  .primary-button {
    flex: 1;
    width: auto;
  }

  .panel {
    padding: 14px;
  }

  .panel-head {
    align-items: flex-start;
  }

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

  .record-time {
    white-space: normal;
  }

  .table-wrap,
  #settingsModulesTable,
  #settingsTypesTable,
  #settingsTagsTable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .settings-table,
  .table-wrap table {
    min-width: 720px;
  }

  .task-form {
    padding: 16px;
  }

  .dialog-head {
    margin: -16px -16px 0;
    top: -16px;
    padding: 14px 16px;
  }

  /* 修复 iOS 输入框自动缩放 */
  input, textarea, select {
    font-size: 16px;
  }

  /* 移动端：隐藏表格，显示卡片 */
  .change-log-table table {
    display: none;
  }
  .change-log-mobile {
    display: block;
  }
  .change-log-card {
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
  }
  .change-log-card-time {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
  }
  .change-log-card-body {
    font-size: 13px;
    color: var(--ink-soft);
  }
  .change-log-card-body .change-item {
    display: inline-block;
    margin-right: 8px;
  }
  .change-log-card-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
  }

}

/* Premium visual layer */
:root {
  --bg: #f2f6f8;
  --surface: #ffffff;
  --surface-soft: #f7fafc;
  --surface-tint: #eef5ff;
  --ink: #101923;
  --ink-soft: #26384d;
  --muted: #60718a;
  --line: #d6e1ea;
  --line-strong: #b8c8d6;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eaf2ff;
  --accent: #f5b82e;
  --accent-soft: #fff4cf;
  --sidebar: #081f3f;
  --sidebar-2: #0c3b78;
  --shadow-sm: 0 1px 2px rgba(16, 25, 35, 0.06), 0 1px 0 rgba(255,255,255,0.65) inset;
  --shadow-md: 0 14px 36px rgba(16, 25, 35, 0.10), 0 1px 0 rgba(255,255,255,0.8) inset;
  --shadow-lg: 0 30px 90px rgba(16, 25, 35, 0.22);
}

body {
  background:
    radial-gradient(circle at 18% -8%, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(circle at 92% 2%, rgba(31, 111, 235, 0.10), transparent 30%),
    linear-gradient(180deg, #f7fbfc 0%, #f2f6f8 44%, #eef3f6 100%);
}

.login-screen {
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.22), transparent 32%),
    radial-gradient(circle at 78% 12%, rgba(31, 111, 235, 0.14), transparent 32%),
    linear-gradient(135deg, #eef7f8, #f5f8fb);
}

.login-card,
.panel,
.summary-item,
.module-card,
.analytics-card,
.analytics-summary-card,
.task-card,
.draft-row,
.record-item {
  border-color: rgba(184, 200, 214, 0.72);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}

.sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 184, 46, 0.18), transparent 34%),
    linear-gradient(180deg, #0d3a76 0%, #071b36 52%, #061426 100%);
  box-shadow: 18px 0 50px rgba(7, 21, 31, 0.10);
}

.brand-mark {
  background: linear-gradient(135deg, #d9eaff 0%, #ffffff 48%, #ffe28a 100%);
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.20);
}

.nav-item {
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-item:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.09);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239, 247, 255, 0.94));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.nav-item.active::before {
  background: linear-gradient(180deg, #f5b82e, #ffe28a);
  box-shadow: 0 0 16px rgba(245, 184, 46, 0.50);
}

.topbar h2 {
  color: #0d1722;
  font-weight: 840;
}

.eyebrow {
  color: #5a708c;
}

.primary-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.30);
}

.primary-button:active,
.ghost-button:active,
.mini-button:active,
.nav-item:active,
.task-card:active,
.analytics-timeline button:active {
  transform: translateY(1px) scale(0.99);
}

.ghost-button,
.mini-button,
.user-switcher,
input,
select,
textarea,
.multi-select-trigger {
  border-color: rgba(184, 200, 214, 0.86);
  box-shadow: 0 1px 2px rgba(16,25,35,0.04), 0 1px 0 rgba(255,255,255,0.75) inset;
}

.ghost-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(16,25,35,0.08);
}

textarea:focus,
input:focus,
select:focus,
.multi-select-trigger:focus {
  border-color: rgba(37, 99, 235, 0.76);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12), 0 10px 24px rgba(16,25,35,0.06);
}

.panel:hover,
.analytics-card:hover,
.analytics-summary-card:hover,
.summary-item:hover,
.module-card:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--shadow-md);
}

.task-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(16,25,35,0.11);
}

.badge,
.pill,
.contact-name-button {
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset;
}

.analytics-bar-track span,
.task-card::before,
.task-item::before {
  transition: width 0.55s cubic-bezier(.2,.8,.2,1), background 0.2s ease;
}

.active-view {
  animation: page-enter 260ms cubic-bezier(.2,.8,.2,1) both;
}

.panel,
.task-card,
.analytics-summary-card,
.analytics-card,
.draft-row {
  animation: card-enter 320ms cubic-bezier(.2,.8,.2,1) both;
}

.dialog-head,
dialog[open] .task-form {
  animation: modal-enter 220ms cubic-bezier(.2,.8,.2,1) both;
}

dialog::backdrop {
  backdrop-filter: blur(6px);
}

.toast.show {
  animation: toast-pop 220ms cubic-bezier(.2,.8,.2,1) both;
}

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

@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1024px) {
  .nav-item:hover,
  .ghost-button:hover,
  .mini-button:hover,
  .task-card:hover,
  .panel:hover,
  .analytics-card:hover,
  .analytics-summary-card:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Executive polish: icons, warning states, richer motion */
.login-card {
  position: relative;
  overflow: hidden;
  animation: login-rise 620ms cubic-bezier(.16,1,.3,1) both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 28%, rgba(255,255,255,0.48) 42%, transparent 58%),
    linear-gradient(135deg, rgba(8,127,117,0.16), rgba(31,111,235,0.08));
  transform: translateX(-120%);
  animation: login-sheen 1600ms 260ms cubic-bezier(.16,1,.3,1) both;
}

.login-card .brand-mark {
  animation: mark-breathe 2600ms ease-in-out infinite;
}

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

.nav-item::after {
  order: -1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: currentColor;
  background: rgba(255,255,255,0.07);
  font-size: 13px;
  transition: transform 0.24s cubic-bezier(.16,1,.3,1), background 0.2s ease;
}

.nav-item[data-view="today"]::after { content: "◈"; }
.nav-item[data-view="info"]::after { content: "✎"; }
.nav-item[data-view="tasks"]::after { content: "☷"; }
.nav-item[data-view="weekly"]::after { content: "◎"; }
.nav-item[data-view="settings"]::after { content: "⚙"; }

.nav-item:hover::after,
.nav-item.active::after {
  transform: scale(1.08) rotate(-4deg);
  background: rgba(8,127,117,0.13);
}

.panel-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.panel-head h3::before,
.analytics-card-head h3::before {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-soft), #ffffff);
  color: var(--brand-dark);
  font-size: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset;
}

.panel:has(#mustList) .panel-head h3::before { content: "✓"; }
.panel:has(#weekWorkList) .panel-head h3::before { content: "↗"; }
.panel:has(#riskList) .panel-head h3::before { content: "!"; }
.panel:has(#completedList) .panel-head h3::before { content: "✓"; }
.panel:has(#taskTable) .panel-head h3::before { content: "☷"; }
.panel:has(#recordTable) .panel-head h3::before { content: "◷"; }
.panel:has(#meetingContent) .panel-head h3::before { content: "✎"; }
.panel:has(#meetingList) .panel-head h3::before { content: "▤"; }
.panel:has(#weeklyOutput) .panel-head h3::before { content: "▣"; }

.panel:has(#riskList) {
  position: relative;
  border-color: rgba(180, 35, 24, 0.26);
  background:
    linear-gradient(135deg, rgba(255,240,237,0.72), rgba(255,255,255,0.9) 48%),
    rgba(255,255,255,0.9);
}

.panel:has(#riskList)::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(180,35,24,0.08) inset, 0 18px 42px rgba(180,35,24,0.08);
}

.panel:has(#riskList) .panel-head h3 {
  color: #8f1f17;
}

.panel:has(#riskList) .panel-head h3::before {
  background: linear-gradient(135deg, #ffe4df, #fff8f6);
  color: var(--danger);
  animation: warning-pulse 1800ms ease-in-out infinite;
}

.panel:has(#riskList) .panel-head span {
  background: var(--danger-soft);
  color: var(--danger);
}

.task-card.overdue,
.task-item.p0 {
  background:
    linear-gradient(135deg, rgba(255,240,237,0.72), rgba(255,255,255,0.98) 46%);
}

.flag-blocker,
.flag-production,
.priority-P0 {
  box-shadow: 0 0 0 1px rgba(180,35,24,0.08) inset, 0 6px 14px rgba(180,35,24,0.08);
}

.primary-button,
.ghost-button,
.mini-button,
.icon-button,
.settings-tab,
.analysis-tab,
.contact-name-button {
  position: relative;
  overflow: hidden;
}

.primary-button::after,
.ghost-button::after,
.mini-button::after,
.icon-button::after,
.settings-tab::after,
.analysis-tab::after,
.contact-name-button::after {
  content: "";
  position: absolute;
  inset: 50%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.ghost-button::after,
.mini-button::after,
.settings-tab::after,
.analysis-tab::after,
.contact-name-button::after {
  background: rgba(8,127,117,0.14);
}

.primary-button:active::after,
.ghost-button:active::after,
.mini-button:active::after,
.icon-button:active::after,
.settings-tab:active::after,
.analysis-tab:active::after,
.contact-name-button:active::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(22);
  transition-duration: 0s;
}

.active-view {
  animation: page-enter-rich 420ms cubic-bezier(.16,1,.3,1) both;
}

.panel,
.task-card,
.analytics-summary-card,
.analytics-card,
.draft-row {
  animation: card-enter-rich 520ms cubic-bezier(.16,1,.3,1) both;
}

.task-card:nth-child(2),
.panel:nth-child(2),
.analytics-card:nth-child(2) { animation-delay: 45ms; }
.task-card:nth-child(3),
.panel:nth-child(3),
.analytics-card:nth-child(3) { animation-delay: 90ms; }
.task-card:nth-child(4),
.panel:nth-child(4),
.analytics-card:nth-child(4) { animation-delay: 135ms; }

@keyframes login-rise {
  from { opacity: 0; transform: translateY(22px) scale(.975); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes login-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@keyframes mark-breathe {
  0%, 100% { transform: translateY(0); box-shadow: 0 14px 34px rgba(12,220,190,.20); }
  50% { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(12,220,190,.32); }
}

@keyframes warning-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180,35,24,0.20); }
  50% { box-shadow: 0 0 0 6px rgba(180,35,24,0.06); }
}

@keyframes page-enter-rich {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes card-enter-rich {
  from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (max-width: 1024px) {
  .nav-item::after {
    display: none;
  }
}

/* Premium icon and motion pass */
.login-screen {
  background:
    radial-gradient(circle at 18% 14%, rgba(0, 184, 169, 0.24), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.18), transparent 32%),
    linear-gradient(145deg, #071a24 0%, #0e2c34 42%, #f5f8fb 43%, #eef4f6 100%);
}

.login-card {
  border-color: rgba(255, 255, 255, 0.48);
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(255,255,255,.92)),
    rgba(255,255,255,.94);
  box-shadow:
    0 34px 90px rgba(4, 20, 30, 0.28),
    0 1px 0 rgba(255,255,255,.82) inset;
}

.login-card::after {
  content: "";
  position: absolute;
  inset: auto 24px 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, #0bb6a6, #2f6feb, transparent);
  opacity: .72;
  animation: login-line 1800ms 420ms cubic-bezier(.16,1,.3,1) both;
}

.nav-item {
  min-height: 44px;
  gap: 11px;
  transition:
    transform .22s cubic-bezier(.16,1,.3,1),
    background .22s ease,
    color .22s ease,
    border-color .22s ease,
    box-shadow .22s ease;
}

.nav-item::after {
  display: none;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .86;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.12));
  transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .2s ease, stroke-width .2s ease;
}

.nav-item:hover {
  transform: translateX(3px);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  opacity: 1;
  stroke-width: 2.15;
  transform: scale(1.08);
}

.nav-item.active {
  background:
    linear-gradient(135deg, rgba(255,255,255,1), rgba(236,249,247,.94));
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.18),
    0 1px 0 rgba(255,255,255,.95) inset;
}

.user-label {
  display: inline-grid;
  place-items: center;
}

.user-label svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #2563eb;
  stroke-width: 2;
  stroke-linecap: round;
}

.panel:has(#riskList) {
  overflow: hidden;
  border-color: rgba(180, 35, 24, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 246, 244, 0.98), rgba(255,255,255,0.96) 44%),
    #fff;
}

.panel:has(#riskList)::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -54px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(180,35,24,.18) 0 34%, transparent 36%),
    conic-gradient(from 140deg, rgba(180,35,24,.34), rgba(251,191,36,.2), rgba(180,35,24,.34));
  opacity: .72;
  animation: risk-orbit 4200ms linear infinite;
}

.panel:has(#riskList) .panel-head {
  position: relative;
  z-index: 1;
  border-bottom-color: rgba(180, 35, 24, 0.18);
}

.panel:has(#riskList) .task-stack {
  position: relative;
  z-index: 1;
}

.panel:has(#riskList) .panel-head h3::before {
  content: "!";
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, #b42318, #ff7a45);
  color: #fff;
  box-shadow:
    0 12px 24px rgba(180,35,24,.22),
    0 0 0 6px rgba(180,35,24,.08);
}

.panel:has(#riskList) .panel-head span {
  background: #b42318;
  color: #fff;
  box-shadow: 0 10px 20px rgba(180,35,24,.18);
}

.task-card,
.task-item,
.draft-row,
.record-item,
.owner-card,
.analytics-card,
.analytics-summary-card,
.panel {
  transition:
    transform .24s cubic-bezier(.16,1,.3,1),
    border-color .22s ease,
    box-shadow .24s ease,
    background .22s ease;
}

.task-card:hover,
.task-item:hover,
.draft-row:hover,
.record-item:hover,
.owner-card:hover,
.analytics-card:hover,
.analytics-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .10);
}

.view.active-view {
  will-change: transform, opacity, filter;
}

@keyframes login-line {
  from { transform: scaleX(.2); opacity: 0; }
  to { transform: scaleX(1); opacity: .72; }
}

@keyframes risk-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .login-screen {
    background:
      linear-gradient(180deg, rgba(7,26,36,.96) 0 188px, #f4f7f9 188px);
  }

  .nav-item:hover {
    transform: none;
  }

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

@media (max-width: 640px) {
  .today-command-bar > button {
    flex: 1 1 calc(50% - 8px);
  }

  .today-insight-grid {
    grid-template-columns: 1fr;
  }

  .today-orbital-card,
  .today-risk-console,
  .today-status-card,
  .today-module-card {
    padding: 13px;
  }

  .orbital-ring {
    width: 138px;
    height: 138px;
  }

  .panel:has(#taskTable) .table-wrap,
  .panel:has(#recordTable) .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .panel:has(#taskTable) table,
  .panel:has(#recordTable) table {
    min-width: 0;
    width: 100%;
    display: block;
  }

  .panel:has(#taskTable) thead,
  .panel:has(#recordTable) thead {
    display: none;
  }

  .panel:has(#taskTable) tbody,
  .panel:has(#recordTable) tbody {
    display: grid;
    gap: 12px;
  }

  .panel:has(#taskTable) tr,
  .panel:has(#recordTable) tr {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(199, 210, 222, .9);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,252,253,.96));
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
  }

  .panel:has(#taskTable) td,
  .panel:has(#recordTable) td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 26px;
    padding: 0;
    border: 0;
    font-size: 13px;
  }

  .panel:has(#taskTable) td::before,
  .panel:has(#recordTable) td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 760;
  }

  .panel:has(#taskTable) td.mobile-title-cell,
  .panel:has(#recordTable) td.mobile-title-cell {
    display: grid;
    justify-items: start;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }

  .panel:has(#taskTable) td.mobile-title-cell::before,
  .panel:has(#recordTable) td.mobile-title-cell::before {
    display: none;
  }

  .mobile-title-cell a {
    color: var(--ink);
    font-size: 15px;
    font-weight: 820;
    line-height: 1.35;
    text-decoration: none;
  }

  .panel:has(#taskTable) td[data-label="操作"] {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel:has(#taskTable) td[data-label="操作"]::before {
    display: none;
  }

  .panel:has(#taskTable) td[data-label="选择"],
  .panel:has(#recordTable) td[data-label="选择"] {
    justify-content: flex-end;
    min-height: 0;
  }

  .panel:has(#taskTable) td[data-label="选择"]::before,
  .panel:has(#recordTable) td[data-label="选择"]::before {
    display: none;
  }
}

/* Final Blue Sunrise override layer */
body {
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 205, 92, .18), transparent 28%),
    radial-gradient(circle at 14% 16%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #eef7ff 0%, #f8fbff 48%, #fff8df 100%);
}

.login-screen {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 211, 105, .34), transparent 30%),
    radial-gradient(circle at 24% 16%, rgba(72, 141, 255, .32), transparent 34%),
    linear-gradient(135deg, #eaf5ff 0%, #f7fbff 48%, #fff2bf 100%);
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 28%, rgba(37, 99, 235, .08) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 42%, rgba(245, 184, 46, .16) 0 2px, transparent 3px);
  background-size: 64px 64px, 92px 92px;
  animation: bluegold-drift 18s linear infinite;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 22%, rgba(255, 195, 57, .28) 23%, transparent 31%),
    linear-gradient(145deg, transparent 0 55%, rgba(37, 99, 235, .12) 56%, transparent 64%),
    repeating-linear-gradient(132deg, transparent 0 36px, rgba(255, 209, 102, .12) 37px, transparent 39px);
  animation: sunrise-flow 8s cubic-bezier(.16,1,.3,1) infinite alternate;
}

.login-card {
  border-color: rgba(255, 218, 111, .48);
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.82)),
    rgba(255,255,255,.86);
  box-shadow:
    0 34px 90px rgba(29, 78, 216, .16),
    0 1px 0 rgba(255,255,255,.88) inset,
    0 0 0 1px rgba(37, 99, 235, .06);
  backdrop-filter: blur(18px);
}

.login-card::before {
  background:
    linear-gradient(120deg, transparent 0 30%, rgba(255, 221, 128, .52) 43%, transparent 58%),
    linear-gradient(135deg, rgba(37, 99, 235, .12), rgba(245, 184, 46, .12));
}

.login-card::after {
  background: linear-gradient(90deg, transparent, #2563eb, #f5b82e, transparent);
}

.login-card .brand-mark,
.brand-mark {
  background: linear-gradient(135deg, #d9eaff 0%, #ffffff 48%, #ffe28a 100%);
  color: #0b2a55;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .22);
}

.sidebar {
  background:
    radial-gradient(circle at 22% 6%, rgba(255, 205, 92, .18), transparent 28%),
    linear-gradient(180deg, #0d3a76 0%, #071b36 52%, #061426 100%);
  border-right-color: rgba(255, 255, 255, .12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, transparent 0 32%, rgba(255, 215, 104, .10) 33%, transparent 38%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.025) 35px, transparent 36px);
}

.brand,
.nav-list {
  position: relative;
  z-index: 1;
}

.brand {
  border-bottom-color: rgba(255, 255, 255, .13);
}

.nav-item {
  color: #d7e8fb;
}

.nav-item:hover {
  background: rgba(255, 255, 255, .09);
}

.nav-item.active {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,247,255,.94));
  color: #0b2a55;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .20), 0 1px 0 rgba(255,255,255,.95) inset;
}

.nav-item.active::before {
  background: linear-gradient(180deg, #f5b82e, #ffe28a);
  box-shadow: 0 0 18px rgba(245, 184, 46, .45);
}

.main {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 5%, rgba(255, 213, 102, .20), transparent 26%),
    radial-gradient(circle at 18% 10%, rgba(37, 99, 235, .10), transparent 30%),
    linear-gradient(135deg, rgba(239, 247, 255, .92), rgba(255,255,255,.78) 48%, rgba(255, 248, 222, .52));
}

.main::before,
.main::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.main::before {
  inset: 0;
  background:
    repeating-linear-gradient(128deg, transparent 0 42px, rgba(245, 184, 46, .085) 43px, transparent 45px),
    radial-gradient(circle at 84% 19%, rgba(37, 99, 235, .08) 0 1px, transparent 2px);
  background-size: auto, 56px 56px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 20%, #000 100%);
}

.main::after {
  right: -110px;
  top: 86px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(245, 184, 46, .22);
  border-radius: 48% 52% 45% 55%;
  background:
    radial-gradient(circle, rgba(255, 225, 143, .24), transparent 54%),
    conic-gradient(from 120deg, rgba(37,99,235,.10), rgba(245,184,46,.18), rgba(37,99,235,.08));
  animation: bluegold-orbit 18s linear infinite;
}

.main > * {
  position: relative;
  z-index: 1;
}

.panel,
.filter-bar,
.quick-strip,
.analytics-note,
.analytics-card,
.analytics-summary-card,
.task-card,
.record-item,
.draft-row,
.owner-card {
  border-color: rgba(178, 201, 230, .82);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(250,253,255,.86));
  box-shadow:
    0 14px 32px rgba(37, 99, 235, .055),
    0 1px 0 rgba(255,255,255,.9) inset;
}

.today-insight-panel {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(237,246,255,.82) 50%, rgba(255,246,213,.72)),
    #fff;
}

.today-insight-panel::after {
  background:
    radial-gradient(circle, rgba(255,215,104,.24) 0 34%, transparent 36%),
    conic-gradient(from 140deg, rgba(37,99,235,.22), rgba(245,184,46,.28), rgba(37,99,235,.18));
}

.primary-button {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}

.primary-button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.ghost-button,
.mini-button,
.user-switcher {
  border-color: rgba(178, 201, 230, .9);
}

textarea:focus,
input:focus,
select:focus,
.multi-select-trigger:focus {
  border-color: rgba(37, 99, 235, .74);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .14), 0 0 0 1px rgba(245, 184, 46, .10) inset;
}

select.filter-active {
  border-color: rgba(37, 99, 235, .72);
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.user-label {
  background: linear-gradient(135deg, #eaf2ff, #fff4cf);
}

.user-label svg {
  stroke: #2563eb;
}

.panel-head h3::before,
.analytics-card-head h3::before {
  background: linear-gradient(135deg, #eaf2ff, #fff7da);
  color: #1d4ed8;
}

.task-card::before,
.task-item::before {
  background: linear-gradient(180deg, #2563eb, #f5b82e);
}

.priority-P1,
.flag-production {
  background: var(--warning-soft);
  color: #a16207;
}

.analytics-bar-track span.brand,
.today-module-row i {
  background: linear-gradient(90deg, #2563eb, #f5b82e);
}

@keyframes bluegold-drift {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(58px, -34px, 0); }
}

@keyframes sunrise-flow {
  from { opacity: .62; transform: translateX(-1.5%); }
  to { opacity: .92; transform: translateX(1.5%); }
}

@keyframes bluegold-orbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
  .main::after {
    width: 260px;
    height: 260px;
    right: -120px;
    top: 140px;
  }

  .login-screen {
    background:
      radial-gradient(circle at 70% 12%, rgba(255, 211, 105, .32), transparent 30%),
      linear-gradient(180deg, #eaf5ff 0 42%, #fff8df 100%);
  }
}

/* Final tab color lock */
#infoView .settings-tabs {
  border-bottom-color: rgba(178, 201, 230, .82) !important;
}

#infoView .settings-tab {
  color: #5f7190 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#infoView .settings-tab:hover {
  color: #1d4ed8 !important;
  background: rgba(255, 255, 255, .72) !important;
}

#infoView .settings-tab.active {
  color: #174ea6 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(239,247,255,.94)) !important;
  box-shadow:
    inset 0 -3px 0 #f5b82e,
    0 10px 22px rgba(37, 99, 235, .08) !important;
}

/* Absolute final lock: blue-gold only, and draft dropdowns must float above following rows. */
#infoTab_quickInput > .panel,
#infoTab_quickInput .panel,
#draftList,
.draft-list,
.draft-row {
  overflow: visible !important;
}

.draft-list {
  position: relative !important;
  gap: 18px !important;
}

.draft-row {
  position: relative !important;
  z-index: 1;
}

.draft-row.dropdown-open {
  z-index: 1200 !important;
}

.multi-select.dropdown-open {
  position: relative;
  z-index: 1300 !important;
}

.multi-select.dropdown-open .multi-select-dropdown {
  z-index: 1400 !important;
}

.draft-row .multi-select-dropdown.open {
  position: static !important;
  margin-top: 8px;
  max-height: 230px;
  overflow-y: auto;
}

.draft-row .multi-select.dropdown-open {
  display: block;
}

.draft-row.dropdown-open {
  padding-bottom: 18px !important;
}

.multi-select-dropdown label:hover {
  background: linear-gradient(135deg, #eaf2ff, #fff7da) !important;
  color: #174ea6 !important;
}
