/* Dashboard CSS - Systus Hub - Editorial Design (CLEAN + Alternanza Grid Areas) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   TOKENS
========================= */
:root {
  --header-h: 64px;

  --green-primary: #4CAF50;
  --green-dark: #2E7D32;
  --green-light: #E8F5E9;

  --bg-white: #FFFFFF;
  --bg-dark: #2C2C2C;

  --text-primary: #1A1A1A;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --text-white: #FFFFFF;
  --text-light: #D1D5DB;

  --border-color: #E5E7EB;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Roboto",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   ENTRY HERO
======================================== */

.entry-hero {
  padding: 2.25rem 1.5rem 1.25rem;
}

.entry-hero__container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  background: #fff;
  min-height: 360px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.entry-hero__media {
  position: relative;
  min-height: 360px;
}

.entry-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.entry-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0.92) 100%);
}

.entry-hero__content {
  position: relative;
  padding: 2.25rem 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.entry-hero__title {
  font-size: 2.25rem;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.entry-hero__subtitle {
  max-width: 46ch;
  color: rgba(0,0,0,0.70);
  font-size: 1rem;
  line-height: 1.6;
}

.entry-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.entry-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.entry-btn .btn-icon {
  width: 18px;
  height: 18px;
}

.entry-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.entry-btn--primary {
  background: rgba(0,0,0,0.92);
  color: #fff;
  border-color: rgba(0,0,0,0.92);
}

.entry-btn--primary:hover {
  background: rgba(0,0,0,1);
}

.entry-btn--ghost {
  background: rgba(255,255,255,0.8);
  color: rgba(0,0,0,0.88);
}

.entry-hero__note {
  font-size: 0.9rem;
  color: rgba(0,0,0,0.55);
  margin-top: 0.25rem;
}

@media (max-width: 900px) {
  .entry-hero__container {
    grid-template-columns: 1fr;
  }

  .entry-hero__media {
    min-height: 240px;
  }

  .entry-hero__overlay {
    background: linear-gradient(180deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.55) 45%, rgba(255,255,255,0.95) 100%);
  }

  .entry-hero__content {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .entry-hero__title {
    font-size: 1.9rem;
  }
}

/* ========================================
   MODULE SECTIONS
======================================== */

.main {
  min-height: calc(100vh - var(--header-h));
}

.module-section {
  width: 100%;
  height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
}

.module-section--light { background: var(--bg-white); }
.module-section--dark  { background: var(--bg-dark); }

.module-container {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 4.75rem 2rem;
}

.module-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 5rem;
  align-items: center;
  grid-template-areas: "content illustration";
}

.module-content     { grid-area: content; }
.module-illustration { grid-area: illustration; }

.module-grid--reverse {
  grid-template-areas: "illustration content";
}

.module-content {
  max-width: 560px;
  display: flex;
  flex-direction: column;
}

.module-content--dark { color: var(--text-white); }

.module-status {
  display: inline-flex;
  width: fit-content;
  padding: 0.375rem 1rem;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  border-radius: 9999px;
}

.module-status--active {
  background: var(--green-light);
  color: var(--green-dark);
}

.module-status--dev {
  background: #E5E7EB;
  color: var(--text-secondary);
}

.module-title {
  font-size: 3.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: 1.75rem;
  color: inherit;
}

.module-content--dark .module-title { color: var(--text-white); }

.module-description {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-top: 1.25rem;
  max-width: 520px;
}

.module-content--dark .module-description { color: var(--text-light); }

.module-actions { margin-top: 2.25rem; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border: 2px solid var(--text-primary);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.btn-outline:hover:not(:disabled) {
  background: var(--text-primary);
  color: var(--bg-white);
  gap: 1.25rem;
}

.btn-outline--dark {
  border-color: var(--text-white);
  color: var(--text-white);
}

.btn-outline--dark:hover:not(:disabled) {
  background: var(--text-white);
  color: var(--text-primary);
}

.btn-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  width: 16px;
  height: 16px;
}

.module-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .module-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    grid-template-areas:
      "illustration"
      "content";
  }

  .module-grid--reverse {
    grid-template-areas:
      "illustration"
      "content";
  }

  .module-section { height: auto; }
  .module-container { padding: 4rem 2rem; }
  .module-title { font-size: 3rem; }
}

@media (max-width: 768px) {
  .module-section { height: auto; }
  .module-container { padding: 3.25rem 1.5rem; }
  .module-title { font-size: 2.5rem; }
  .module-description { font-size: 16px; }
}

@media (max-width: 480px) {
  .module-container,
  .footer-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .module-title { font-size: 2rem; }

  .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   UPGRADE MODAL
========================================================= */

/* =========================================================
   UPGRADE MODAL
========================================================= */

body.modal-open { overflow: hidden; }

.upgrade-modal[hidden] {
  display: none !important;
}

.upgrade-modal {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  padding: 24px;
}

.upgrade-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
  backdrop-filter: blur(3px);
}

.upgrade-panel {
  position: relative;
  width: min(480px, calc(100vw - 48px));
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 32px 80px rgba(0,0,0,0.18);
  padding: 32px;
  animation: upgradeIn .2s ease-out forwards;
}

@keyframes upgradeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.upgrade-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.upgrade-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text-primary);
}

.upgrade-x {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}

.upgrade-x:hover { background: #F3F4F6; }
.upgrade-x i { width: 16px; height: 16px; color: var(--text-muted); }

/* Divider */
.upgrade-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0 0 20px;
}

/* Subtitle */
.upgrade-sub {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

/* Feature list */
.upgrade-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.upgrade-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
}

.upgrade-list i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green-dark);
}

/* Actions */
.upgrade-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upgrade-btn-primary {
  width: 100%;
  height: 50px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  cursor: pointer;
  border: 2px solid var(--text-primary);
  background: var(--text-primary);
  color: #fff;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

.upgrade-btn-primary:hover {
  background: #000;
  border-color: #000;
}

.upgrade-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upgrade-btn-ghost {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  font-size: 13px;
  letter-spacing: 0.03em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.upgrade-btn-ghost:hover {
  background: #F9FAFB;
  color: var(--text-primary);
}

/* Note */
.upgrade-note {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 520px) {
  .upgrade-panel { padding: 24px 20px; }
}