:root {
  --bg: #f6f7fb;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-solid: #ffffff;
  --border: rgba(226, 232, 240, 0.85);
  --text: #111827;
  --muted: #5b6474;
  --brand-a: #e63946;
  --brand-b: #ff6b35;
  --brand-c: #6d5dfc;
  --success: #14b86a;
  --warning: #f59e0b;
  --shadow: 0 24px 80px -32px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 48%, #fff8f5 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 1.6rem;
}

.login-view {
  width: 100%;
  min-height: calc(100vh - 3.2rem);
}

.brand-panel,
.login-card,
.sidebar,
.content,
.panel,
.kpi-card {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.login-screen-legacy {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 3.2rem);
  overflow: hidden;
  border-radius: 2.1rem;
  background: linear-gradient(135deg, #fff5f5 0%, #ffffff 45%, #fff8f5 100%);
  border: 1px solid rgba(226, 232, 240, 0.65);
  box-shadow: 0 38px 90px -54px rgba(15, 23, 42, 0.28);
}

.login-bg-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 28%, rgba(230, 57, 70, 0.08) 0, rgba(230, 57, 70, 0.08) 2px, transparent 3px),
    radial-gradient(circle at 78% 72%, rgba(255, 107, 53, 0.08) 0, rgba(255, 107, 53, 0.08) 2px, transparent 3px);
  background-size: 320px 240px, 360px 260px;
  opacity: 0.65;
  pointer-events: none;
}

.login-blob {
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.06;
  pointer-events: none;
  animation: pulseBlob 8s ease-in-out infinite;
}

.login-blob-a {
  top: 18%;
  left: 14%;
  background: #e63946;
}

.login-blob-b {
  right: 14%;
  bottom: 18%;
  background: #ff6b35;
}

.login-network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.login-topbar {
  position: relative;
  z-index: 3;
  height: 5.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
}

.login-topbar-brand {
  display: flex;
  align-items: center;
}

.login-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.suite-copy {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: #8b97aa;
}

.theme-button {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.6);
  color: #64748b;
  border-radius: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  box-shadow: 0 10px 24px -22px rgba(15, 23, 42, 0.55);
}

.theme-button-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  border: 2px solid #98a2b3;
  border-top-color: transparent;
  display: inline-block;
}

.login-stage {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 11.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.25rem 1.5rem 1rem;
}

.brand-panel {
  border-radius: 2rem;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-logo {
  width: 170px;
  margin-bottom: 1rem;
}

.brand-logo-login-header {
  height: clamp(46px, 4.5vw, 66px);
  width: auto;
  object-fit: contain;
}

.brand-logo-login-card {
  height: clamp(56px, 6vw, 82px);
  width: auto;
  object-fit: contain;
  margin: 0 auto 1.15rem;
}

.brand-badge,
.status-pill,
.panel-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-badge,
.status-pill {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(255, 107, 53, 0.18));
  color: var(--brand-b);
}

.brand-panel h1,
.page-header h2 {
  margin: 1rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
}

.brand-panel p,
.muted-copy {
  color: var(--muted);
  line-height: 1.7;
}

.bullet-list {
  margin: 1.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.bullet-list li + li {
  margin-top: 0.75rem;
}

.login-card {
  border-radius: 2rem;
  padding: 2.2rem;
  align-self: center;
}

.login-card-mockup {
  width: 100%;
  max-width: 440px;
  padding: 3rem 3rem 2.55rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.58);
  box-shadow: 0 26px 72px -34px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(24px);
}

.card-header {
  margin-bottom: 1.5rem;
}

.card-header-centered {
  text-align: center;
  margin-bottom: 1.8rem;
}

.card-header h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 3vw, 2.3rem);
  line-height: 1.05;
}

.card-header p {
  margin: 0;
  color: var(--muted);
}

.card-header-mockup p {
  max-width: 26rem;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.28;
}

.role-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem;
  margin-bottom: 1.4rem;
  background: rgba(241, 245, 249, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.1rem;
}

.role-switch-mockup {
  padding: 0.42rem;
  margin-bottom: 1.55rem;
  background: rgba(241, 245, 249, 0.82);
  border-radius: 1.35rem;
}

.role-switch-button {
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 1rem 0.8rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.role-switch-button-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 14px 32px -24px rgba(15, 23, 42, 0.5);
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.form-stack-mockup {
  gap: 1.25rem;
}

.form-stack label {
  display: grid;
  gap: 0.45rem;
}

.form-stack span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.form-stack input {
  width: 100%;
  border-radius: 1.35rem;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 1rem 1.35rem;
  font-size: 0.98rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.form-stack input:focus {
  outline: none;
  border-color: rgba(255, 107, 53, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.08);
}

.primary-button,
.secondary-button,
.nav-item {
  border: 0;
  border-radius: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #fff;
  padding: 0.95rem 1.2rem;
  font-weight: 700;
  box-shadow: 0 18px 30px -20px rgba(230, 57, 70, 0.9);
}

.primary-button-mockup {
  margin-top: 1rem;
  border-radius: 1.25rem;
  padding: 1.15rem 1.2rem;
  font-size: 1.03rem;
  box-shadow: 0 18px 32px -22px rgba(255, 107, 53, 0.58);
}

.secondary-button {
  background: #fff;
  color: var(--text);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
}

.primary-button:hover,
.secondary-button:hover,
.nav-item:hover {
  transform: translateY(-1px);
}

.error-message {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(230, 57, 70, 0.09);
  color: #b42318;
  text-align: center;
}

.login-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1rem 1.25rem;
  color: #98a2b3;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.app-view {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  min-height: calc(100vh - 4rem);
  max-width: 1440px;
  margin: 0 auto;
}

.sidebar {
  border-radius: 2rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-logo {
  width: 155px;
  margin-bottom: 1rem;
}

.sidebar-kicker,
.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-b);
}

.nav-stack {
  display: grid;
  gap: 0.65rem;
  margin: 2rem 0;
}

.nav-item {
  padding: 0.95rem 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-weight: 600;
  border: 1px solid var(--border);
}

.nav-item-active {
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(255, 107, 53, 0.16));
  color: var(--brand-b);
}

.sidebar-footer {
  display: grid;
  gap: 1rem;
}

.user-chip {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.user-avatar {
  display: inline-flex;
  width: 2.7rem;
  height: 2.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-a), var(--brand-b));
  color: #fff;
  font-weight: 700;
}

.content {
  border-radius: 2rem;
  padding: 2rem;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.cards-grid,
.panels-grid {
  display: grid;
  gap: 1rem;
}

.cards-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.kpi-card {
  border-radius: 1.5rem;
  padding: 1.35rem;
}

.kpi-label {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.kpi-meta {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.panel {
  border-radius: 1.5rem;
  padding: 1.25rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel h3 {
  margin: 0;
  font-size: 1.15rem;
}

.panel-label {
  background: rgba(109, 93, 252, 0.1);
  color: var(--brand-c);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.85rem 0.6rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.92rem;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-active,
.status-ready {
  background: rgba(20, 184, 106, 0.12);
  color: var(--success);
}

.status-scheduled,
.status-processing {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-completed {
  background: rgba(109, 93, 252, 0.12);
  color: var(--brand-c);
}

@media (max-width: 1100px) {
  .app-view,
  .cards-grid,
  .panels-grid {
    grid-template-columns: 1fr;
  }

  .login-topbar {
    padding: 0 1.35rem;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 0.85rem;
  }

  .login-card,
  .content,
  .sidebar {
    padding: 1.25rem;
    border-radius: 1.4rem;
  }

  .page-header {
    flex-direction: column;
  }

  .suite-copy {
    display: none;
  }

  .login-stage {
    padding: 1.4rem 0.9rem 0.8rem;
  }

  .login-card-mockup {
    padding: 2rem 1.4rem 1.8rem;
  }

  .login-topbar {
    height: 4.9rem;
  }

  .card-header h2 {
    font-size: 1.8rem;
  }
}

@keyframes pulseBlob {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}
