:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-alt: #f1f5f9;
  --border: #d8e2f0;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --cyan: #0891b2;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --purple: #7c3aed;
  --nav: #0f172a;
  --nav-soft: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 274px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #fff;
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  padding: 6px 8px 12px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 14px;
}

.brand h1 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  font-size: 13px;
}

.profile-card {
  margin: 18px 0 20px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-card strong,
.mini-card strong,
.metric-card strong,
.stat-card strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.profile-card span,
.mini-card span,
.metric-card span,
.stat-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sidebar-section {
  margin-top: 18px;
}

.sidebar-title {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  padding: 0 10px 10px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--nav-soft);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-note {
  margin-top: 22px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.74);
}

.main {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-marker {
  padding: 8px 12px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.breadcrumbs {
  color: var(--muted);
  font-size: 13px;
}

.topbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search {
  width: 320px;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.lang-switch {
  display: inline-flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

.lang-switch button.active {
  background: #eff6ff;
  color: var(--brand-2);
}

.topbar-right.topbar-right-extended {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workbench-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workbench-action,
.workbench-user-trigger {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--text);
}

.workbench-action:hover,
.workbench-action.active,
.workbench-user-trigger:hover,
.workbench-user-trigger.active {
  border-color: #bfdbfe;
  background: #f8fbff;
  transform: translateY(-1px);
}

.workbench-action-icon,
.workbench-avatar,
.workbench-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.workbench-action-icon {
  background: #eff6ff;
  color: var(--brand-2);
}

.workbench-avatar {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.workbench-action-meta,
.workbench-user-meta,
.workbench-chat-identity,
.workbench-menu-link-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.workbench-action-title,
.workbench-user-meta strong,
.workbench-chat-identity strong,
.workbench-panel-title strong,
.workbench-menu-link strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.workbench-action-note,
.workbench-user-meta span,
.workbench-chat-identity span,
.workbench-panel-title span,
.workbench-menu-link span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.workbench-action-badge {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.workbench-chevron {
  color: var(--muted);
  font-size: 14px;
  flex: 0 0 auto;
}

.workbench-scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 60;
}

.workbench-scrim.open {
  opacity: 1;
  pointer-events: auto;
}

body.workbench-overlay-open {
  overflow: hidden;
}

.workbench-panel,
.workbench-drawer,
.workbench-menu {
  position: fixed;
  right: 28px;
  border-radius: 26px;
  border: 1px solid rgba(216, 226, 240, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.985);
  transition: 0.22s ease;
  z-index: 70;
  overflow: hidden;
}

.workbench-panel,
.workbench-drawer {
  display: flex;
  flex-direction: column;
}

.workbench-panel.open,
.workbench-drawer.open,
.workbench-menu.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.workbench-panel {
  top: 96px;
  width: min(420px, calc(100vw - 56px));
  max-height: calc(100vh - 124px);
}

.workbench-drawer {
  bottom: 28px;
  width: min(480px, calc(100vw - 56px));
  max-height: calc(100vh - 140px);
  transform: translateY(22px);
}

.workbench-drawer.open {
  transform: translateY(0);
}

.workbench-menu {
  top: 96px;
  width: min(340px, calc(100vw - 56px));
}

.workbench-panel-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.96);
}

.workbench-panel-title {
  display: grid;
  gap: 4px;
}

.workbench-panel-body {
  padding: 18px;
  display: grid;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.workbench-section-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workbench-feed,
.workbench-chat-list,
.workbench-menu-links {
  display: grid;
  gap: 12px;
}

.workbench-feed-item,
.workbench-chat-card,
.workbench-mini-stat,
.workbench-menu-link,
.workbench-brief {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface-soft);
}

.workbench-feed-item,
.workbench-chat-card,
.workbench-brief,
.workbench-mini-stat {
  padding: 14px 15px;
}

.workbench-feed-item {
  display: block;
  transition: 0.2s ease;
}

.workbench-feed-item:hover,
.workbench-menu-link:hover {
  background: #fff;
  border-color: #bfdbfe;
}

.workbench-feed-top,
.workbench-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.workbench-feed-item p,
.workbench-chat-preview,
.workbench-brief p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 13px;
}

.workbench-feed-top time,
.workbench-chat-head time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.workbench-feed-tags,
.workbench-chat-actions,
.workbench-menu-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.workbench-tag,
.workbench-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.workbench-tag {
  background: #eff6ff;
  color: var(--brand-2);
}

.workbench-link-chip {
  background: #fff;
  color: var(--brand-2);
  border: 1px solid #bfdbfe;
}

.workbench-drawer-search {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}

.workbench-brief {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 50%, #ecfeff 100%);
  border-color: #dbeafe;
}

.workbench-brief strong,
.workbench-mini-stat strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.workbench-chat-meta,
.workbench-menu-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.workbench-chat-avatar {
  background: #e2e8f0;
  color: var(--text);
  box-shadow: none;
}

.workbench-menu {
  padding: 18px;
}

.workbench-menu-header {
  flex-direction: column;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.workbench-menu-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.workbench-mini-stat span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.workbench-menu-link {
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: 0.2s ease;
}

.header {
  margin-bottom: 20px;
}

.header h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
}

.header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 980px;
}

.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 50%, #ecfeff 100%);
  border: 1px solid #dbeafe;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
}

.hero h3,
.card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.35;
}

.hero p,
.card p,
.card li {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-actions,
.chip-list,
.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 18px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #bfdbfe;
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-2);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.button.primary {
  background: var(--brand);
  color: #fff;
}

.button.ghost {
  background: #fff;
  border-color: #bfdbfe;
  color: var(--brand-2);
}

.hero-side {
  display: grid;
  gap: 12px;
}

.mini-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 16px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.section {
  margin-bottom: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card.soft {
  background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.card-header h3,
.card-header h4 {
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 700;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.metric-foot {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.list-item strong {
  display: inline-block;
  margin-bottom: 6px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.table th {
  color: var(--text);
  background: #f8fafc;
  font-weight: 700;
}

.table td small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.status,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.ok,
.tag.ok {
  background: #dcfce7;
  color: #166534;
}

.status.pending,
.tag.pending {
  background: #ffedd5;
  color: #9a3412;
}

.status.warn,
.tag.warn {
  background: #fee2e2;
  color: #b91c1c;
}

.status.info,
.tag.info {
  background: #e0f2fe;
  color: #075985;
}

.status.purple,
.tag.purple {
  background: #ede9fe;
  color: #5b21b6;
}

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.3fr 1fr;
}

.progress {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.progress.blue span {
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
}

.progress.green span {
  background: linear-gradient(90deg, #16a34a, #22c55e);
}

.progress.amber span {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(50px, 1fr));
  gap: 12px;
  align-items: end;
  height: 220px;
  margin-top: 14px;
}

.bar {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  height: 100%;
}

.bar-fill {
  height: var(--h);
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%);
}

.bar.amber .bar-fill {
  background: linear-gradient(180deg, #fdba74 0%, #ea580c 100%);
}

.bar.green .bar-fill {
  background: linear-gradient(180deg, #86efac 0%, #16a34a 100%);
}

.bar span,
.bar strong {
  text-align: center;
  font-size: 12px;
}

.bar strong {
  color: var(--text);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-time {
  color: var(--muted);
  font-weight: 700;
}

.timeline-card {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.duo {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.note {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  line-height: 1.75;
}

.note strong {
  color: #7c2d12;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-pill,
.toggle-pill {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.highlight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.highlight {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.highlight h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.detail-list {
  display: grid;
  gap: 12px;
}

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
}

.detail-row strong {
  color: var(--muted);
  font-size: 13px;
}

.formula {
  display: grid;
  gap: 12px;
}

.formula-step {
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.formula-step code {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--brand-2);
}

.kanban {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kanban-column {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.kanban-column h4 {
  margin: 0 0 12px;
}

.kanban-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.kanban-card:last-child {
  margin-bottom: 0;
}

.kanban-card strong {
  display: block;
  margin-bottom: 8px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.device-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.device-card {
  padding: 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.device-card strong {
  display: block;
  margin-bottom: 6px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-feed {
  display: grid;
  gap: 12px;
}

.audit-row {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.audit-row small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.phone-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.phone {
  width: 100%;
  max-width: 290px;
  margin: 0 auto;
  background: #0f172a;
  padding: 12px;
  border-radius: 34px;
  box-shadow: 0 28px 50px rgba(15, 23, 42, 0.16);
}

.phone-screen {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border-radius: 24px;
  overflow: hidden;
  min-height: 560px;
}

.phone-header {
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff;
}

.phone-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.phone-block {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.phone-block strong {
  display: block;
  margin-bottom: 6px;
}

.phone-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(59, 130, 246, 0.22), transparent 28%),
    radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.18), transparent 26%),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: #fff;
}

.login-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  align-items: center;
}

.login-frame {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: 0 40px 80px rgba(2, 6, 23, 0.38);
}

.login-frame::before,
.login-frame::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  pointer-events: none;
}

.login-frame::before {
  width: 340px;
  height: 340px;
  background: rgba(37, 99, 235, 0.28);
  top: -120px;
  left: -80px;
}

.login-frame::after {
  width: 280px;
  height: 280px;
  background: rgba(34, 211, 238, 0.14);
  right: -80px;
  bottom: -80px;
}

.login-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 460px;
  min-height: 760px;
}

.login-visual {
  padding: 42px 44px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(6, 182, 212, 0.08));
}

.login-visual-top {
  display: grid;
  gap: 18px;
}

.login-topline {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.login-brandline {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.28);
}

.login-brandline strong {
  display: block;
  font-size: 24px;
  line-height: 1.2;
}

.login-brandline span,
.login-visual p,
.login-visual li,
.login-footerline {
  color: rgba(255, 255, 255, 0.72);
}

.login-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.login-visual h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1.16;
  max-width: 720px;
}

.login-subtext {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.9;
}

.login-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-kpi {
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.login-kpi strong {
  display: block;
  font-size: 34px;
  margin-bottom: 6px;
}

.login-kpi span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  font-size: 13px;
}

.login-visual-bottom {
  display: grid;
  gap: 16px;
}

.login-info-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-info-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.login-info-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.login-info-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-info-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
}

.login-panel {
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.95));
}

.login-card {
  width: 100%;
  max-width: 396px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(216, 226, 240, 0.95);
  box-shadow: 0 28px 50px rgba(15, 23, 42, 0.16);
  padding: 26px;
}

.login-card h3 {
  margin: 0 0 8px;
  font-size: 28px;
  color: var(--text);
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.login-card-header {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.login-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.auth-switch {
  display: flex;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
}

.auth-pill {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
}

.auth-pill.active {
  background: #eff6ff;
  color: var(--brand-2);
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.login-field input,
.login-field select {
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.login-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.login-helper {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.login-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.login-button {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.login-button.primary {
  background: linear-gradient(135deg, #2563eb, #0f6adf);
  color: #fff;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.28);
}

.login-button.secondary {
  background: #fff;
  color: var(--brand-2);
  border-color: #bfdbfe;
}

.login-demo {
  margin-top: 16px;
  padding: 14px 15px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px dashed #bfdbfe;
}

.login-demo strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
}

.login-demo code {
  display: inline-block;
  margin-top: 4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--brand-2);
}

.login-footerline {
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.75;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.soft-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.export-tiles {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.export-tile {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.export-tile strong {
  display: block;
  margin-bottom: 8px;
}

.mini-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.button.small {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
}

.app-grid {
  display: grid;
  gap: 14px;
}

.app-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-data-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.mini-data-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.mini-data-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.live-list {
  display: grid;
  gap: 12px;
}

.live-list-item {
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.live-list-item strong {
  display: block;
  margin-bottom: 8px;
}

.live-list-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.api-form {
  display: grid;
  gap: 14px;
}

.api-form label {
  display: grid;
  gap: 8px;
}

.api-form label span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.api-form input,
.api-form select,
.api-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  padding: 12px 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-message,
.muted-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.empty-state,
.empty-cell {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.empty-state {
  padding: 20px 14px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

#login-form-message {
  min-height: 20px;
  color: var(--red);
  font-size: 13px;
}

@media (max-width: 1120px) {
  .login-grid {
    grid-template-columns: 1fr;
  }

  .login-visual,
  .login-panel {
    padding: 26px;
  }

  .login-visual h2 {
    font-size: 36px;
  }
}

@media (max-width: 760px) {
  .login-shell {
    padding: 14px;
  }

  .login-grid {
    min-height: auto;
  }

  .login-kpi-grid,
  .login-info-grid,
  .login-row {
    grid-template-columns: 1fr;
  }

  .login-card {
    max-width: 100%;
    padding: 22px;
  }

  .login-visual h2 {
    font-size: 30px;
  }
}

@media (max-width: 1260px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .hero-grid,
  .split,
  .grid-3,
  .grid-2,
  .duo,
  .kanban {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-left,
  .topbar-right {
    flex-wrap: wrap;
  }

  .workbench-panel,
  .workbench-menu {
    right: 18px;
    width: min(420px, calc(100vw - 36px));
  }

  .workbench-drawer {
    right: 18px;
    bottom: 18px;
    width: min(480px, calc(100vw - 36px));
  }
}

@media (max-width: 760px) {
  .main {
    padding: 18px;
  }

  .header h2 {
    font-size: 28px;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  .bar-chart {
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    gap: 8px;
  }

  .detail-row {
    grid-template-columns: 1fr;
  }

  .search {
    width: 100%;
  }

  .workbench-actions {
    width: 100%;
    justify-content: space-between;
  }

  .workbench-action,
  .workbench-user-trigger {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 0;
    justify-content: center;
  }

  .workbench-action-meta,
  .workbench-user-meta {
    display: none;
  }

  .workbench-panel,
  .workbench-menu {
    left: 12px;
    right: 12px;
    top: 126px;
    width: auto;
    max-height: calc(100vh - 146px);
  }

  .workbench-drawer {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: calc(100vh - 154px);
  }

  .workbench-panel-header {
    flex-direction: column;
  }

  .workbench-menu-kpis {
    grid-template-columns: 1fr;
  }

  .app-grid-4,
  .form-grid.two {
    grid-template-columns: 1fr;
  }
}
