:root {
  color-scheme: light;
  --bg: #e8eef5;
  --panel: rgba(255, 255, 255, 0.84);
  --ink: #13304a;
  --muted: #5b6f82;
  --line: rgba(19, 48, 74, 0.12);
  --accent: #2c68b1;
  --accent-2: #0f3f78;
  --shadow: 0 24px 60px rgba(18, 37, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(44, 104, 177, 0.18), transparent 32%),
    linear-gradient(180deg, #eef4fa 0%, #dde8f3 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}


body.auth-locked {
  overflow: hidden;
}

body.auth-locked .page-shell {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  align-items: center;
  background: linear-gradient(180deg, rgba(232, 238, 245, 0.92), rgba(221, 232, 243, 0.96));
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 20;
}

.auth-overlay[hidden] {
  display: none;
}

.auth-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(19, 48, 74, 0.12);
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(18, 37, 59, 0.18);
  color: var(--ink);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 28px;
  width: min(100%, 420px);
}

.auth-eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0;
  text-transform: uppercase;
}

.auth-card h2 {
  font-size: 1.9rem;
  line-height: 1;
  margin: 0;
}

.auth-copy,
.auth-message {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  margin: 0;
}

.auth-panel {
  display: grid;
  gap: 12px;
}

.auth-field {
  color: var(--muted);
  display: grid;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 6px;
}

.auth-field input {
  border: 1px solid rgba(19, 48, 74, 0.18);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 12px;
}

.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 104, 177, 0.18);
  outline: none;
}

.auth-primary,
.auth-secondary,
.logout-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.auth-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 16px;
}

.auth-secondary {
  background: #ffffff;
  border: 1px solid rgba(19, 48, 74, 0.14);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  min-height: 40px;
  padding: 9px 14px;
}

.auth-message.is-error {
  color: #9a261b;
  font-weight: 700;
}

.logout-button {
  justify-self: start;
  background: #255f9e;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 8px 15px;
}
.page-shell {
  margin: 0 auto;
  max-width: 1280px;
  height: 100vh;
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 10px 14px 12px;
}

.hero {
  align-items: center;
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  overflow: hidden;
  padding: 12px 18px;
}

.hero-logo {
  display: block;
  height: min(13vh, 96px);
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.hero-copy {
  display: grid;
  gap: 8px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 0.98;
  margin: 0;
}

.hero-text {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
  margin: 0;
  max-width: none;
}

.mosaic-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.mosaic-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 248, 252, 0.94) 100%);
  border: 1px solid rgba(19, 48, 74, 0.1);
  border-radius: 22px;
  box-shadow: 0 20px 44px rgba(18, 37, 59, 0.1);
  color: inherit;
  display: grid;
  align-content: stretch;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 10px;
  position: relative;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.mosaic-card:hover {
  border-color: rgba(44, 104, 177, 0.28);
  box-shadow: 0 26px 54px rgba(18, 37, 59, 0.16);
  transform: translateY(-3px);
}

.card-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.card-kicker {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.card-head h2 {
  font-size: 1.08rem;
  line-height: 1.02;
  margin: 0;
}

.card-action {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  white-space: nowrap;
}

.card-url {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0;
}

.preview-frame {
  height: 100%;
  min-height: 0;
  background: #ffffff;
  border: 1px solid rgba(19, 48, 74, 0.09);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.preview-window {
  width: 62%;
  height: calc(100% - 28px);
  left: 50%;
  top: 14px;
  position: absolute;
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(44, 104, 177, 0.16), rgba(255, 255, 255, 0.08)),
    #cfdbe8;
  border: 1px solid rgba(19, 48, 74, 0.16);
  border-radius: 14px;
  overflow: hidden;
}

.preview-window-image {
  background: linear-gradient(180deg, #e7eef6 0%, #d7e2ef 100%);
}

.preview-scale {
  width: 490px;
  height: 306px;
  left: 50%;
  top: 50%;
  position: absolute;
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.preview-scale iframe {
  background: #ffffff;
  border: 0;
  height: 900px;
  width: 1440px;
  pointer-events: none;
  transform: scale(0.34);
  transform-origin: top left;
}

.preview-scale-crm {
  top: 49%;
}

.preview-scale-ites {
  top: 46%;
}

.preview-scale-crm iframe {
  height: 704px;
  width: 1126px;
  transform: scale(0.435);
}

.preview-scale-ites iframe {
  height: 569px;
  width: 911px;
  transform: scale(0.538);
}
.preview-image {
  display: block;
  width: 88%;
  height: 88%;
  left: 50%;
  top: 50%;
  position: absolute;
  object-fit: contain;
  object-position: center top;
  transform: translate(-50%, -50%);
}

.preview-image-ites {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -55%);
}

.card-copy {
  color: #40576d;
  font-size: 0.8rem;
  line-height: 1.25;
  margin: 0;
}

@media (max-width: 1100px) {
  body {
    overflow: auto;
  }

  .page-shell {
    height: auto;
    grid-template-rows: auto auto;
    padding: 16px 14px 24px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .mosaic-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .mosaic-card {
    grid-template-rows: auto auto auto auto;
  }

  .preview-frame {
    aspect-ratio: 16 / 10;
    height: auto;
  }
}

@media (max-width: 640px) {
  .hero {
    border-radius: 20px;
    padding: 14px;
  }

  .mosaic-card {
    border-radius: 18px;
    padding: 12px;
  }

  .card-head {
    flex-direction: column;
  }

  .card-action {
    align-self: flex-start;
  }
}


.auth-panel[hidden] {
  display: none !important;
}
