:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-blue: #eff6ff;
  --text: #111827;
  --muted: #6b7280;
  --muted-2: #94a3b8;
  --border: #e5e7eb;
  --border-dark: #cbd5e1;
  --primary: #2f6fed;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf2ff;
  --accent: #fb923c;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --purple: #7c3aed;
  --purple-soft: #ede9fe;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 28px 90px rgba(15, 23, 42, 0.22);
  --header-height: 58px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

button,
input,
select {
  font: inherit;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  padding: 9px 13px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 150ms var(--ease),
    background 150ms var(--ease),
    box-shadow 150ms var(--ease),
    opacity 150ms var(--ease);
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(47, 111, 237, 0.16);
}

button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition:
    border-color 150ms var(--ease),
    box-shadow 150ms var(--ease);
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.app {
  min-height: 100vh;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
}

h2 {
  margin-bottom: 0;
  font-size: 16px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

h4 {
  margin-bottom: 6px;
}

small {
  color: var(--muted);
}

.secondary-btn {
  background: var(--success);
}

.secondary-btn:hover {
  background: #15803d;
}

.tertiary-btn {
  background: #64748b;
}

.tertiary-btn:hover {
  background: #475569;
}

.logout-btn,
.danger-btn {
  background: var(--danger);
}

.logout-btn:hover,
.danger-btn:hover {
  background: #b91c1c;
}

.ghost-btn {
  border: 1px solid var(--border-dark);
  background: #ffffff;
  color: var(--text);
}

.ghost-btn:hover {
  background: var(--surface-soft);
  color: var(--text);
  box-shadow: none;
}

.small-btn {
  padding: 7px 10px;
  font-size: 12px;
}

.link-btn {
  justify-self: start;
  padding: 0;
  background: transparent;
  color: var(--primary);
}

.link-btn:hover {
  background: transparent;
  color: var(--primary-dark);
  text-decoration: underline;
  transform: none;
  box-shadow: none;
}

.animate-fade {
  animation: fadeIn 220ms var(--ease) both;
}

.animate-rise {
  animation: riseIn 260ms var(--ease) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Toast */

.toast-container {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 220;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-md);
  animation: toastIn 220ms var(--ease) both;
  pointer-events: auto;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.toast button {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--primary); }

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate3d(14px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Loading / Modal */

.loading-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(5px);
  animation: fadeIn 180ms var(--ease) both;
}

.loading-card,
.confirm-modal {
  width: min(430px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: modalIn 220ms var(--ease) both;
}

.spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border: 4px solid #dbeafe;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.inline-spinner {
  width: 15px;
  height: 15px;
  border: 3px solid rgba(255, 255, 255, 0.5);
  border-top-color: #ffffff;
  border-radius: 999px;
  animation: spin 900ms linear infinite;
}

.loading-steps {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  text-align: left;
}

.loading-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.loading-step span {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.loading-step.done span {
  background: var(--success-soft);
  color: var(--success);
}

.loading-step.active span {
  background: #dbeafe;
  color: var(--primary);
}

.loading-close {
  margin-top: 18px;
}

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

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

.modal-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: #92400e;
  font-weight: 900;
  font-size: 22px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

/* Auth */

.auth-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
  background:
    radial-gradient(circle at 10% 10%, rgba(47, 111, 237, 0.16), transparent 28%),
    radial-gradient(circle at 90% 0%, rgba(56, 189, 248, 0.12), transparent 24%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 45%, #f5f7fb 100%);
}

.auth-shell {
  width: min(1120px, 100%);
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
  gap: 18px;
}

.auth-info-panel,
.enterprise-login-card {
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.auth-info-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 32px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(255, 255, 255, 0.86)),
    #ffffff;
}

.auth-info-panel::before {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(47, 111, 237, 0.10);
}

.auth-info-panel::after {
  content: "";
  position: absolute;
  left: -90px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.10);
}

.auth-info-top,
.auth-feature-list,
.auth-info-footer {
  position: relative;
  z-index: 1;
}

.logo-box {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-fallback {
  color: var(--primary);
  font-weight: 900;
  font-size: 13px;
  line-height: 1.05;
  letter-spacing: 0.05em;
}

.auth-info-logo {
  width: 160px;
  min-width: 160px;
  height: 54px;
  justify-content: start;
  margin-bottom: 28px;
}

.auth-brand-copy h1 {
  max-width: 520px;
  margin-bottom: 12px;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.auth-brand-copy p {
  max-width: 620px;
  margin: 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.75;
}

.auth-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.auth-feature-list article {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.auth-feature-list article span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.auth-feature-list article strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 13px;
}

.auth-feature-list article p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.auth-info-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 28px;
}

.mini-badge {
  display: grid;
  gap: 2px;
  min-width: 180px;
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.92);
}

.mini-badge strong {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.mini-badge span {
  color: #475569;
  font-size: 11px;
}

.enterprise-login-card {
  align-self: center;
  width: 100%;
  max-width: 470px;
  justify-self: end;
  padding: 28px;
}

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

.auth-card-header h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.auth-card-header p {
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.5;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.connection-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.connection-pill.online {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.connection-pill.online span {
  background: #16a34a;
}

.connection-pill.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.connection-pill.error span {
  background: #dc2626;
}

.connection-pill.checking span {
  background: #f59e0b;
  animation: pulseDot 1s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.auth-inline-alert {
  margin-bottom: 14px;
  padding: 12px 13px;
  border: 1px solid #fecaca;
  border-left: 5px solid var(--danger);
  border-radius: 12px;
  background: #fff7f7;
}

.auth-inline-alert strong {
  display: block;
  margin-bottom: 4px;
  color: #991b1b;
  font-size: 13px;
}

.auth-inline-alert p {
  margin: 0;
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.45;
}

.enterprise-login-card .auth-form {
  display: grid;
  gap: 14px;
  margin-top: 0;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.input-with-icon input {
  height: 44px;
  padding-left: 36px;
}

.input-with-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.input-action-btn {
  min-width: 72px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: #334155;
  font-size: 12px;
}

.input-action-btn:hover {
  background: #f8fafc;
  color: var(--primary);
  box-shadow: none;
}

.login-primary-btn {
  min-height: 46px;
  margin-top: 2px;
  font-size: 14px;
}

.auth-security-note {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.auth-security-note strong {
  color: #1e40af;
  font-size: 13px;
}

.auth-security-note span {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.reset-title h3 {
  margin: 0 0 4px;
}

.reset-title p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.auth-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.auth-message {
  min-height: 18px;
  font-size: 13px;
}

/* Header */

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 120;
  min-height: var(--header-height);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-area {
  display: flex;
  align-items: center;
  padding-right: 8px;
  border-right: 1px solid var(--border);
}

.header-logo {
  width: 148px;
  min-width: 148px;
  height: 46px;
}

.top-nav {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  overflow-x: auto;
}

.nav-item {
  position: relative;
  min-height: var(--header-height);
  padding: 0 13px;
  border-radius: 0;
  background: transparent;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.nav-item:hover {
  background: var(--surface-soft);
  color: var(--primary);
  box-shadow: none;
  transform: none;
}

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.version-badge {
  display: inline-grid;
  gap: 1px;
  min-width: 132px;
  padding: 7px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: rgba(239, 246, 255, 0.95);
  color: var(--primary);
}

.version-badge span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.version-badge small {
  color: #475569;
  font-size: 10px;
  white-space: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
}

.icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: none;
}

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

.user-chip {
  max-width: 230px;
  min-width: 180px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.user-chip strong,
.user-chip small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-chip strong {
  font-size: 12px;
}

.user-chip small {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

/* Main */

.main-area {
  padding: 14px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.view {
  display: none;
}

.active-view {
  display: block;
  animation: riseIn 220ms var(--ease) both;
}

/* Panel / Dashboard */

.panel {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.compact-header {
  margin-bottom: 12px;
}

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

.panel-wide {
  grid-column: span 1;
}

.panel-tall {
  min-height: 340px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.kpi-card {
  padding: 10px;
  border: 1px solid var(--border-dark);
  border-left: 4px solid var(--primary);
  border-radius: 9px;
  background: #ffffff;
}

.kpi-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.status-pill,
.health-pill,
.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

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

.health-healthy,
.status-success {
  background: var(--success-soft);
  color: #15803d;
}

.health-watch,
.status-warning {
  background: var(--warning-soft);
  color: #92400e;
}

.health-risk,
.status-error {
  background: var(--danger-soft);
  color: #b91c1c;
}

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-md {
  height: 280px;
}

.chart-sm {
  height: 245px;
}

.split-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: center;
}

.latest-import-box {
  display: grid;
  gap: 8px;
}

.latest-import-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--border-dark);
  border-radius: 9px;
  background: #ffffff;
}

.latest-import-title strong {
  display: block;
  font-size: 18px;
}

.latest-import-title p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.latest-import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.latest-import-metric {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.latest-import-metric span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.latest-import-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
}

.chart-legend-list,
.compact-list,
.history-list,
.activity-list,
.users-list,
.status-alert-list {
  display: grid;
  gap: 8px;
}

.legend-row,
.compact-item,
.history-item,
.activity-item,
.user-item,
.status-alert,
.list-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
}

.legend-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
}

.compact-item {
  display: grid;
  gap: 4px;
}

.compact-item strong,
.history-item strong,
.activity-item strong,
.user-item strong,
.list-item strong {
  display: block;
}

.compact-item p,
.history-item p,
.activity-item p,
.user-item p,
.list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

.clickable-row {
  cursor: pointer;
}

.compact-item.clickable-row:hover,
.history-item:hover,
.activity-item:hover,
.user-item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.mini-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mini-status-card {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.mini-status-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mini-status-card strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.compact-empty {
  padding: 16px;
}

/* Skeleton */

.skeleton {
  position: relative;
  overflow: hidden;
  background: #eef2f7;
  border-radius: 8px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: skeletonShimmer 1.2s infinite;
}

@keyframes skeletonShimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-line {
  height: 12px;
  margin-bottom: 8px;
}

.skeleton-line.sm {
  width: 42%;
}

.skeleton-line.md {
  width: 68%;
}

.skeleton-line.lg {
  width: 88%;
}

.skeleton-card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.skeleton-card {
  height: 72px;
}

.skeleton-chart {
  height: 280px;
}

.skeleton-list {
  display: grid;
  gap: 8px;
}

.skeleton-list-item {
  height: 58px;
}

/* Empty state */

.empty-state-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.empty-state-card strong {
  color: #334155;
}

.empty-state-card p {
  max-width: 420px;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

/* Quick actions */

.quick-actions-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.quick-actions-panel h2 {
  margin: 0;
  font-size: 16px;
}

.quick-actions-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.quick-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chart-loading-placeholder {
  height: 100%;
  min-height: 220px;
}

/* Import */

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.wizard-step span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  font-weight: 900;
}

.wizard-step.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--primary);
}

.wizard-step.done {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--success);
}

.import-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 12px;
  align-items: start;
}

.import-control-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.upload-box {
  min-height: 150px;
  display: grid;
  place-items: center;
  justify-items: center;
  padding: 22px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.upload-box:hover,
.upload-box.drag-over {
  border-color: var(--primary);
  background: #eff6ff;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}

.upload-box small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 400;
}

.import-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.import-warning {
  padding: 11px;
  border: 1px solid #fde68a;
  border-radius: 9px;
  background: var(--warning-soft);
  color: #92400e;
  line-height: 1.5;
  font-size: 12px;
}

.import-preview {
  min-height: 300px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.empty-preview {
  display: grid;
  place-items: center;
}

.empty-state {
  text-align: center;
}

.empty-state p {
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.preview-item {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-soft);
}

.preview-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.preview-item strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.warning-box,
.error-box,
.success-box {
  margin-top: 12px;
  padding: 11px;
  border-radius: 9px;
  line-height: 1.5;
  font-size: 13px;
}

.warning-box {
  border: 1px solid #fde68a;
  background: var(--warning-soft);
  color: #92400e;
}

.error-box {
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: #991b1b;
}

.success-box {
  border: 1px solid #bbf7d0;
  background: var(--success-soft);
  color: #166534;
}

.validation-report,
.accepted-sample-report {
  margin-top: 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
  overflow: hidden;
}

.accepted-sample-report {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.validation-report-header,
.accepted-sample-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 13px;
  border-bottom: 1px solid #fecaca;
  background: var(--danger-soft);
}

.accepted-sample-header {
  border-bottom-color: #bbf7d0;
  background: #dcfce7;
}

.validation-report-header h4,
.accepted-sample-header h4 {
  margin: 0 0 4px;
}

.validation-report-header h4 {
  color: #991b1b;
}

.accepted-sample-header h4 {
  color: #166534;
}

.validation-report-header p,
.accepted-sample-header p {
  margin: 0;
  line-height: 1.45;
  font-size: 12px;
}

.validation-report-header p {
  color: #7f1d1d;
}

.accepted-sample-header p {
  color: #14532d;
}

.validation-table-wrap,
.sample-table-wrap {
  overflow-x: auto;
  background: #ffffff;
}

.validation-table-wrap table,
.sample-table-wrap table {
  min-width: 760px;
}

.validation-table-wrap th {
  background: #fff1f2;
  color: #991b1b;
}

.sample-table-wrap th {
  background: #f0fdf4;
  color: #166534;
}

.validation-table-wrap td,
.sample-table-wrap td {
  vertical-align: top;
  white-space: normal;
}

.validation-reason {
  color: #991b1b;
  font-weight: 800;
}

/* Tables */

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 170px 160px 170px;
  gap: 10px;
  margin-bottom: 12px;
}

.table-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.result-text {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-card {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.table-card.compact-density th,
.table-card.compact-density td {
  padding: 7px 9px;
  font-size: 12px;
}

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

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

tbody tr {
  transition: background 150ms var(--ease);
}

tbody tr:hover {
  background: #eff6ff;
}

.number-cell {
  text-align: right;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-orange {
  background: #ffedd5;
  color: #c2410c;
}

.badge-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge-green {
  background: var(--success-soft);
  color: #15803d;
}

.badge-red {
  background: var(--danger-soft);
  color: #b91c1c;
}

.badge-gray {
  background: #f1f5f9;
  color: #475569;
}

.empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

/* Users */

.user-row {
  display: grid;
  grid-template-columns: 1fr 170px 120px;
  gap: 8px;
  align-items: center;
}

/* System status */

.status-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.status-card {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.status-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.status-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.status-card small {
  display: block;
  line-height: 1.45;
}

.status-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: 10px;
  background: #ffffff;
}

.status-alert.success { border-left-color: var(--success); }
.status-alert.warning { border-left-color: var(--warning); }
.status-alert.error { border-left-color: var(--danger); }

.status-alert strong {
  display: block;
}

.status-alert p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

/* Drawer */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(15, 23, 42, 0.45);
  animation: fadeIn 180ms var(--ease) both;
}

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 140;
  width: min(980px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  animation: drawerIn 220ms var(--ease) both;
}

@keyframes drawerIn {
  from {
    transform: translate3d(28px, 0, 0);
    opacity: 0.7;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.drawer-meta-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.close-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 24px;
}

.close-btn:hover {
  background: #e2e8f0;
  box-shadow: none;
}

.drawer-tabs {
  display: flex;
  gap: 7px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.drawer-tab {
  background: transparent;
  color: var(--muted);
}

.drawer-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
  transform: none;
  box-shadow: none;
}

.drawer-tab.active {
  background: #eff6ff;
  color: var(--primary);
}

.drawer-body {
  padding: 18px;
  overflow-y: auto;
}

.drawer-panel {
  display: none;
}

.active-drawer-panel {
  display: block;
  animation: riseIn 180ms var(--ease) both;
}

.drawer-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.drawer-summary .kpi-card {
  box-shadow: none;
}

.drawer-info {
  display: grid;
  gap: 8px;
}

.info-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #ffffff;
}

.info-row strong {
  color: #334155;
}

/* Responsive */

@media (max-width: 1280px) {
  .kpi-grid,
  .preview-grid,
  .skeleton-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .split-card {
    grid-template-columns: 1fr;
  }

  .status-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-info-panel {
    padding: 24px;
  }

  .enterprise-login-card {
    max-width: 100%;
    justify-self: stretch;
  }

  .auth-feature-list {
    grid-template-columns: 1fr;
  }

  .auth-brand-copy h1 {
    font-size: 32px;
  }

  .app-header {
    display: grid;
    height: auto;
    padding: 8px 10px;
  }

  .header-left,
  .header-right {
    width: 100%;
  }

  .header-left {
    display: grid;
    gap: 8px;
  }

  .brand-area {
    border-right: 0;
    padding-right: 0;
  }

  .top-nav {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #ffffff;
  }

  .nav-item {
    min-height: 44px;
  }

  .header-right {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-version,
  .user-chip {
    flex: 1 1 190px;
  }

  .import-layout {
    grid-template-columns: 1fr;
  }

  .table-toolbar {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .auth-layout {
    padding: 12px;
  }

  .auth-info-panel,
  .enterprise-login-card {
    border-radius: 14px;
    padding: 18px;
  }

  .auth-info-logo {
    width: 140px;
    min-width: 140px;
    margin-bottom: 18px;
  }

  .auth-feature-list {
    display: none;
  }

  .auth-info-footer {
    padding-top: 20px;
  }

  .auth-card-header {
    display: grid;
  }

  .connection-pill {
    width: fit-content;
  }

  .input-with-action {
    grid-template-columns: 1fr;
  }

  .input-action-btn {
    width: 100%;
  }

  .auth-card-footer {
    display: grid;
  }

  .main-area {
    padding: 10px;
  }

  .page-heading {
    margin-bottom: 10px;
  }

  .kpi-grid,
  .preview-grid,
  .latest-import-grid,
  .wizard-steps,
  .table-toolbar,
  .status-card-grid,
  .mini-status-grid,
  .user-row,
  .modal-actions,
  .drawer-summary,
  .skeleton-card-grid {
    grid-template-columns: 1fr;
  }

  .header-right button,
  .version-badge,
  .user-chip {
    width: 100%;
  }

  .chart-md,
  .chart-sm {
    height: 240px;
  }

  .validation-report-header,
  .accepted-sample-header {
    flex-direction: column;
  }

  .drawer {
    width: 100%;
  }

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

  .table-action-row {
    display: grid;
  }

  .table-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
.sample-report { margin-top: 14px; }

@media (max-width: 640px) {

  .quick-actions-panel {
    display: grid;
  }

  .quick-action-buttons {
    justify-content: stretch;
  }

  .quick-action-buttons button {
    width: 100%;
  }

}


/* =========================================================
   V30.3.0 UX Motion, Import Shortcuts & UI Privacy Polish
========================================================= */

:root {
  --motion-fast: 160ms;
  --motion-normal: 240ms;
  --motion-slow: 720ms;
}

.view.active-view {
  animation: viewSoftIn var(--motion-normal) var(--ease) both;
}

@keyframes viewSoftIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

.dashboard-layout > .panel,
.quick-actions-panel {
  animation: cardStaggerIn 420ms var(--ease) both;
}

.dashboard-layout > .panel:nth-child(1) { animation-delay: 0ms; }
.dashboard-layout > .panel:nth-child(2) { animation-delay: 60ms; }
.dashboard-layout > .panel:nth-child(3) { animation-delay: 120ms; }
.dashboard-layout > .panel:nth-child(4) { animation-delay: 180ms; }
.dashboard-layout > .panel:nth-child(5) { animation-delay: 240ms; }
.dashboard-layout > .panel:nth-child(6) { animation-delay: 300ms; }

@keyframes cardStaggerIn {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.panel,
.quick-actions-panel,
.compact-item,
.history-item,
.activity-item,
.user-item,
.status-card,
.source-download-card {
  transition:
    transform var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease);
}

.panel:hover,
.quick-actions-panel:hover,
.status-card:hover,
.source-download-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.compact-item.clickable-row:hover,
.history-item:hover,
.activity-item:hover,
.user-item:hover,
.source-download-btn:hover {
  transform: translateY(-2px);
}

button:active,
.source-download-btn:active {
  transform: translateY(0) scale(0.99);
}

.icon-btn.is-spinning {
  animation: refreshSpin 720ms var(--ease) both;
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

.toast.toast-out {
  animation: toastOut 180ms var(--ease) both;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translate3d(18px, 0, 0);
  }
}

.drawer-panel.active-drawer-panel {
  animation: drawerPanelIn 220ms var(--ease) both;
}

@keyframes drawerPanelIn {
  from {
    opacity: 0;
    transform: translate3d(8px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.wizard-step {
  transition:
    transform var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease);
}

.wizard-step.active {
  transform: translateY(-1px);
}

.wizard-step.done span {
  animation: stepDonePop 260ms var(--ease) both;
}

@keyframes stepDonePop {
  0% { transform: scale(0.86); }
  65% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.upload-box.drag-over {
  animation: uploadPulse 900ms ease-in-out infinite;
}

.upload-box.drag-over .upload-icon {
  animation: uploadIconFloat 820ms ease-in-out infinite;
}

@keyframes uploadPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 237, 0.14); }
  50% { box-shadow: 0 0 0 7px rgba(47, 111, 237, 0.04); }
}

@keyframes uploadIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.field-highlight {
  animation: fieldHighlight 1200ms var(--ease) both;
}

@keyframes fieldHighlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 111, 237, 0); }
  18%, 72% { box-shadow: 0 0 0 4px rgba(47, 111, 237, 0.14); border-color: var(--primary); }
}

.source-download-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.source-download-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.source-download-card p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.5;
}

.source-download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.source-download-btn {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-areas:
    "icon title"
    "icon meta";
  align-items: center;
  justify-items: start;
  gap: 2px 9px;
  padding: 11px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.source-download-btn:hover {
  background: #f8fbff;
  color: #0f172a;
  box-shadow: 0 10px 20px rgba(47, 111, 237, 0.11);
}

.source-download-btn.selected {
  border-color: var(--primary);
  background: #eff6ff;
}

.download-icon {
  grid-area: icon;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #dbeafe;
  color: var(--primary);
  font-weight: 900;
  transition: transform var(--motion-fast) var(--ease);
}

.source-download-btn:active .download-icon {
  transform: translateY(3px);
}

.source-download-btn strong {
  grid-area: title;
  font-size: 13px;
}

.source-download-btn small {
  grid-area: meta;
  font-size: 11px;
}

.source-download-status {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.source-download-status.is-highlighted {
  animation: sourceStatusFlash 1400ms var(--ease) both;
}

@keyframes sourceStatusFlash {
  0%, 100% { background: rgba(255, 255, 255, 0.72); }
  18%, 72% { background: #dcfce7; color: #166534; }
}

.nav-item,
.drawer-tab,
.badge,
.status-pill,
.health-pill {
  transition:
    transform var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease),
    color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease);
}

.nav-item:active,
.drawer-tab:active {
  transform: scale(0.99);
}

@media (max-width: 640px) {
  .source-download-grid {
    grid-template-columns: 1fr;
  }
}



/* V30.4.0 Import Safety & Stability Polish */
.import-guide-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.import-guide-card h3 {
  margin: 0 0 5px;
  color: #0f172a;
}

.import-guide-card p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.55;
}

.import-step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.import-step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(191, 219, 254, 0.9);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.import-step-list span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.import-step-list strong {
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.import-safety-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
  background: #f0fdf4;
  cursor: pointer;
}

.import-safety-check input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--success);
  cursor: pointer;
}

.import-safety-check span {
  display: grid;
  gap: 3px;
}

.import-safety-check strong {
  color: #166534;
  font-size: 13px;
}

.import-safety-check small {
  color: #166534;
  font-size: 12px;
  line-height: 1.45;
}

.import-safety-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.summary-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.summary-heading-row h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.summary-heading-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.summary-grid {
  margin: 0;
}

.import-confirm-note {
  padding: 11px 12px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
}

.import-confirm-note strong {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
}

.import-confirm-note p {
  margin: 0;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

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


/* =========================================================
   V30.4.0 Soft Enterprise Dashboard UI
   Sidebar + soft analytics dashboard refresh
========================================================= */
:root {
  --soft-bg: #eef2f6;
  --soft-shell: #ffffff;
  --soft-sidebar: #fbfcfd;
  --soft-card: rgba(255, 255, 255, 0.96);
  --soft-ink: #101828;
  --soft-muted: #667085;
  --soft-line: rgba(148, 163, 184, 0.26);
  --soft-green: #0f7a4e;
  --soft-green-2: #19a169;
  --soft-blue: #2563eb;
  --soft-radius: 22px;
  --soft-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

body {
  background:
    radial-gradient(circle at 0% 0%, rgba(47, 111, 237, 0.10), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 26%),
    var(--soft-bg);
  color: var(--soft-ink);
}

.soft-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 0;
  background: transparent;
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px;
  border-right: 1px solid var(--soft-line);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: 14px 0 42px rgba(15, 23, 42, 0.04);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid var(--soft-line);
}

.sidebar-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.sidebar-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand-copy strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.sidebar-brand-copy span {
  color: var(--soft-muted);
  font-size: 11px;
  font-weight: 700;
}

.app-nav {
  display: grid;
  align-content: start;
  gap: 6px;
  overflow: visible;
}

.sidebar-section-label {
  margin: 14px 10px 5px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-sidebar .nav-item {
  min-height: 42px;
  width: 100%;
  justify-content: flex-start;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 850;
}

.app-sidebar .nav-item:hover {
  background: #ffffff;
  color: var(--soft-green);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.app-sidebar .nav-item.active {
  background: linear-gradient(135deg, #0f7a4e, #18a56d);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 122, 78, 0.24);
}

.app-sidebar .nav-item.active::after {
  display: none;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(15, 122, 78, 0.09);
  color: inherit;
  font-weight: 900;
}

.app-sidebar .nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-footer-card {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.32), transparent 42%),
    linear-gradient(145deg, #052e1b, #0f5132 58%, #06351f);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 22px 44px rgba(6, 53, 31, 0.22);
}

.sidebar-footer-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.sidebar-footer-card span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.5;
}

.sidebar-action {
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sidebar-action:hover {
  background: #ffffff;
  color: #0f5132;
  box-shadow: none;
}

.app-workspace {
  min-width: 0;
  padding: 20px 24px 28px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 110;
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--soft-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.topbar-search-wrap {
  min-width: 280px;
  width: min(440px, 44vw);
  height: 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f6f8fb;
  color: #98a2b3;
}

.topbar-search-wrap:focus-within {
  border-color: rgba(15, 122, 78, 0.24);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 122, 78, 0.08);
}

.topbar-search-wrap input {
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.topbar-search-wrap kbd {
  padding: 3px 7px;
  border-radius: 7px;
  background: #ffffff;
  color: #667085;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.32);
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.topbar-status-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(15, 122, 78, 0.16);
  border-radius: 999px;
  background: #ecfdf3;
  color: #0f7a4e;
  font-size: 12px;
  font-weight: 900;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #12b76a;
  box-shadow: 0 0 0 5px rgba(18, 183, 106, 0.12);
}

.soft-app .header-version {
  border-color: rgba(15, 122, 78, 0.16);
  background: #ffffff;
  color: #0f7a4e;
}

.soft-app .icon-btn {
  border: 0;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.soft-app .icon-btn:hover {
  color: #0f7a4e;
  background: #ecfdf3;
}

.soft-app .user-chip {
  min-width: 190px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.soft-app .main-area {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0;
}

.soft-page-heading {
  margin: 2px 0 16px;
}

.soft-page-heading h1 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--soft-muted);
  font-size: 14px;
}

.soft-hero-panel {
  min-height: 110px;
  border: 1px solid var(--soft-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 0% 0%, rgba(20, 184, 166, 0.14), transparent 36%),
    radial-gradient(circle at 100% 100%, rgba(37, 99, 235, 0.10), transparent 38%),
    #ffffff;
  box-shadow: var(--soft-shadow);
}

.soft-hero-panel h2 {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.hero-action {
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid rgba(15, 122, 78, 0.22);
  border-radius: 999px;
  background: #ffffff;
  color: #0f5132;
  box-shadow: none;
}

.hero-action.primary,
.hero-action:hover {
  background: linear-gradient(135deg, #0f7a4e, #18a56d);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(15, 122, 78, 0.18);
}

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

.soft-app .panel {
  border: 1px solid var(--soft-line);
  border-radius: var(--soft-radius);
  background: var(--soft-card);
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.055);
}

.soft-app .panel:hover {
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.075);
}

.soft-app .dashboard-layout > .panel-wide {
  grid-column: span 8;
}

.soft-app .dashboard-layout > .panel:not(.panel-wide) {
  grid-column: span 4;
}

.analytics-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
    radial-gradient(circle at 90% 4%, rgba(20, 184, 166, 0.12), transparent 34%);
}

.soft-kpi-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.soft-app .kpi-card,
.soft-app .latest-import-metric,
.soft-app .mini-status-card,
.soft-app .status-card,
.soft-app .preview-item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.03);
}

.soft-kpi-grid .kpi-card:nth-child(1) {
  background: linear-gradient(145deg, #0f7a4e, #18a56d);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 20px 38px rgba(15, 122, 78, 0.22);
}

.soft-kpi-grid .kpi-card:nth-child(1) span {
  color: rgba(255, 255, 255, 0.72);
}

.soft-app .kpi-card span {
  font-size: 12px;
}

.soft-app .kpi-card strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.soft-app .chart-md {
  height: 300px;
}

.soft-app .chart-sm {
  height: 260px;
}

.soft-app .latest-import-title,
.soft-app .legend-row,
.soft-app .compact-item,
.soft-app .history-item,
.soft-app .activity-item,
.soft-app .user-item,
.soft-app .status-alert,
.soft-app .list-item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #ffffff;
}

.soft-app .compact-item.clickable-row:hover,
.soft-app .history-item:hover,
.soft-app .activity-item:hover,
.soft-app .user-item:hover,
.soft-app tbody tr:hover {
  background: #f0fdf4;
}

.soft-app .import-control-card,
.soft-app .import-preview,
.soft-app .table-card {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.045);
}

.import-guide-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 122, 78, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, 0.12), transparent 38%),
    #f8fffb;
}

.import-step-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.import-step-list li {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 12px;
}

.import-step-list li span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf3;
  color: #0f7a4e;
  font-weight: 900;
}

.import-safety-check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(15, 122, 78, 0.18);
  border-radius: 18px;
  background: #f8fffb;
}

.import-safety-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #0f7a4e;
}

.import-safety-check small {
  display: block;
  margin-top: 4px;
  line-height: 1.45;
}

.soft-app .upload-box {
  border-radius: 22px;
}

.soft-app .upload-box:hover,
.soft-app .upload-box.drag-over {
  border-color: #0f7a4e;
  background: #f0fdf4;
}

.soft-app .upload-icon {
  background: #ecfdf3;
  color: #0f7a4e;
  border-radius: 16px;
}

.soft-app .wizard-step {
  border-radius: 18px;
  background: #ffffff;
}

.soft-app .wizard-step.active {
  border-color: rgba(15, 122, 78, 0.20);
  background: #ecfdf3;
  color: #0f7a4e;
}

.soft-app .table-toolbar {
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: #f8fafc;
}

.soft-app th {
  background: #f8fafc;
}

.soft-app .drawer {
  border-radius: 28px 0 0 28px;
  background: #f2f4f7;
}

.soft-app .drawer-header,
.soft-app .drawer-tabs {
  background: rgba(255, 255, 255, 0.94);
}

.soft-app .drawer-summary .kpi-card {
  border-radius: 20px;
}

@media (max-width: 1180px) {
  .soft-app {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    z-index: 115;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--soft-line);
  }

  .sidebar-brand,
  .sidebar-footer-card,
  .sidebar-section-label {
    display: none;
  }

  .app-nav {
    display: flex;
    overflow-x: auto;
    gap: 8px;
  }

  .app-sidebar .nav-item {
    width: auto;
    min-width: max-content;
  }

  .app-workspace {
    padding: 14px;
  }

  .app-topbar {
    position: static;
    flex-wrap: wrap;
  }

  .topbar-search-wrap {
    width: 100%;
  }

  .soft-app .dashboard-layout > .panel-wide,
  .soft-app .dashboard-layout > .panel:not(.panel-wide) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .soft-app .kpi-grid,
  .soft-kpi-grid,
  .preview-grid,
  .status-card-grid,
  .drawer-summary {
    grid-template-columns: 1fr 1fr;
  }

  .soft-hero-panel,
  .quick-actions-panel {
    display: grid;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-status-pill,
  .header-version {
    display: none;
  }
}
