:root {
  /* Brand */

  --pink: #e989d1;
  --light-pink: #ffd9fe;
  --purple: #ae9beb;

  /* Supporting */

  --white: #ffffff;
  --off-white: #fff8ff;
  --surface: rgba(255,255,255,.78);
  --surface-strong: rgba(255,255,255,.92);

  --text: #1b1320;
  --text-light: #746a78;

  --border: rgba(174,155,235,.18);

  --success: #4dbb7b;
  --warning: #f2c94c;
  --danger: #ff6d8f;

  --shadow-sm: 0 8px 24px rgba(40,20,50,.06);
  --shadow-md: 0 20px 45px rgba(40,20,50,.10);
  --shadow-lg: 0 40px 90px rgba(40,20,50,.14);

  --gradient:
      linear-gradient(
          120deg,
          var(--pink),
          var(--light-pink),
          var(--purple)
      );

  --radius-sm:14px;
  --radius-md:20px;
  --radius-lg:28px;
  --radius-xl:38px;
}

* {
  box-sizing: border-box;
}

body{
    margin:0;
    color:var(--text);
    background:

    radial-gradient(
        circle at top left,
        rgba(233,137,209,.22),
        transparent 34%
    ),

    radial-gradient(
        circle at top right,
        rgba(174,155,235,.18),
        transparent 32%
    ),

    linear-gradient(
        180deg,
        #ffffff,
        #fff9fd 40%,
        #fff8ff
    );

    font-family:Inter,sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 12px 36px rgba(255, 79, 216, 0.28);
}

.brand-lockup h1 {
  margin: 2px 0 0;
  font-size: 1.25rem;
  line-height: 1;
}

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

.auth-card,
.center-card,
.hero-card,
.module-card {
  
    position:relative;

    overflow:hidden;

    width:min(620px,100%);

    margin:70px auto;

    padding:46px;

    border-radius:34px;

    background:

        linear-gradient(
            145deg,
            rgba(255,255,255,.92),
            rgba(255,249,253,.95)
        );

    border:1px solid rgba(233,137,209,.16);

    box-shadow:
        0 35px 90px
        rgba(60,25,80,.12);
}

.auth-card {
  width: min(520px, 100%);
  margin: 70px auto 0;
  padding: 34px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-glow{

    position:absolute;

    top:-140px;
    right:-120px;

    width:320px;
    height:320px;

    border-radius:50%;

    background:

        radial-gradient(
            circle,

            rgba(233,137,209,.45),

            rgba(174,155,235,.18),

            transparent 72%
        );

    filter:blur(18px);

    pointer-events:none;

}

.auth-card::before{

    content:"";

    position:absolute;

    left:-120px;
    bottom:-120px;

    width:260px;
    height:260px;

    border-radius:50%;

    background:

        radial-gradient(

            circle,

            rgba(255,217,254,.55),

            transparent 70%

        );

    filter:blur(22px);

}

.auth-card h2,
.center-card h2,
.hero-card h2 {
   margin:16px 0;

  font-size:3rem;

  line-height:.95;

  letter-spacing:-.06em;

  color:var(--text);
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.form-stack {
  display: grid;
  gap: 16px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--pink-soft);
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(255, 79, 216, 0.12);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 900;
  cursor: pointer;
}

.primary-btn {
  color: #160716;
  background: linear-gradient(135deg, var(--gold), var(--pink-soft));
}

.ghost-btn {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.center-card {
  width: min(520px, 100%);
  margin: 90px auto 0;
  padding: 34px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.loader {
  width: 42px;
  height: 42px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--pink);
  animation: spin 0.8s linear infinite;
}

.dashboard {
  display: grid;
  gap: 22px;
}

.hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px;
  border-radius: var(--radius-xl);
}

.pill {
  flex: 0 0 auto;
  border: 1px solid rgba(247, 215, 116, 0.45);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--gold);
  background: rgba(247, 215, 116, 0.1);
  font-weight: 900;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.module-card {
  min-height: 260px;
  padding: 22px;
  border-radius: var(--radius-lg);
  transition: 0.2s ease;
}

.module-card.active:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 79, 216, 0.48);
  background: var(--card-strong);
}

.module-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
}

.module-card h3 {
  margin: 10px 0;
  font-size: 1.35rem;
}

.module-card p {
  color: var(--muted);
  line-height: 1.55;
}

.module-card span {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold);
  font-weight: 900;
}

.locked {
  opacity: 0.62;
}

.danger-text {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

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

@media (max-width: 900px) {
  .module-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 16px;
  }

  .team-header {
    margin-bottom: 24px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-lockup h1{

    margin:0;

    font-size:1.5rem;

    font-weight:800;

    background:var(--gradient);

    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;

}

  .auth-card,
  .center-card,
  .hero-card {
    padding: 24px;
  }

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

  .module-card {
    min-height: auto;
  }

  .ghost-btn {
    padding: 10px 14px;
  }
}

.portal-logo{

    width:58px;
    height:58px;

    object-fit:contain;

    filter:
        drop-shadow(
            0 12px 30px
            rgba(233,137,209,.25)
        );

}

.team-header{

    position:sticky;

    top:18px;

    z-index:100;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:18px 28px;

    border-radius:26px;

    background:rgba(255,255,255,.72);

    backdrop-filter:blur(20px);

    border:1px solid var(--border);

    box-shadow:var(--shadow-md);

    margin-bottom:40px;

}

.module-card{

    background:var(--surface);

    border:1px solid var(--border);

    transition:.25s;

}

.module-card:hover{

    transform:translateY(-5px);

    box-shadow:var(--shadow-lg);

    border-color:var(--pink);

}

.primary-btn{

    background:var(--gradient);

    color:#1b1320;   /* Dark brand text */

    border:none;

    font-weight:700;

    box-shadow:
        0 12px 28px
        rgba(233,137,209,.28);

}

.ghost-btn{

    background:white;

    border:1px solid var(--border);

    color:var(--text);

}

.portal-version{
    margin:8px 0 6px;

    font-size:.95rem;

    color:var(--text-light);

    font-weight:500;
}

.portal-version span{

    display:inline-flex;

    align-items:center;

    margin-left:10px;

    padding:4px 10px;

    border-radius:999px;

    background:rgba(233,137,209,.12);

    color:var(--pink);

    font-size:.8rem;

    font-weight:700;

    border:1px solid rgba(233,137,209,.18);
}

.portal-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(233, 137, 209, 0.25));
}

.google-login{

    margin-top:30px;

}

.google-btn{

    width:100%;

    display:flex;

    align-items:center;

    justify-content:center;

    gap:14px;

}

.google-btn img{

    width:22px;

    height:22px;

}

.portal-logo{
    width:90px;
    height:90px;
    object-fit:contain;
    flex-shrink:0;

    filter:
        drop-shadow(
            0 18px 35px
            rgba(233,137,209,.28)
        );
}

.portal-logo {
  width: 140px !important;
  max-width: 140px !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.hero-card {
  padding: 22px 26px !important;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--gradient);
  color: var(--text);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(233, 137, 209, 0.22);
  white-space: nowrap;
}

@media (max-width: 560px) {
  .portal-logo {
    width: 96px !important;
    max-width: 96px !important;
  }

  .hero-card {
    padding: 18px !important;
  }

  .role-badge {
    width: fit-content;
  }
}

.compact-form-row select {
  min-height: 56px;
  height: 56px;
}

.multi-check-grid {
  align-items: start;
}

.multi-check-grid label {
  min-height: 52px;
}

/* Email page logo fix */
.email-layout .hero-card,
.email-hero.hero-card {
  width: 100%;
  margin: 0;
}

.email-panel {
  width: 100%;
  margin: 0;
}

.email-tabs-wrap {
  display: flex;
  justify-content: center;
  margin: -4px 0 18px;
}

.email-tabs {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;

  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.email-tab {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-light);
  font-weight: 900;
  font-size: 0.98rem;
  cursor: pointer;
}

.email-tab.active {
  background: var(--gradient);
  color: var(--text);
  box-shadow: 0 12px 28px rgba(233, 137, 209, 0.24);
}

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

.small-pill {
  font-size: 0.82rem;
  padding: 8px 13px;
}

.builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.campaign-form {
  display: grid;
  gap: 16px;
}

.campaign-form label {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
}

.campaign-form input,
.campaign-form select,
.campaign-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  font: inherit;
}

.campaign-form textarea {
  min-height: 130px;
  resize: vertical;
}

.raw-html-input {
  min-height: 300px !important;
  font-family: monospace;
  font-size: 0.9rem;
}

.mode-toggle,
.preview-toggle,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mode-btn,
.preview-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 14px;
  background: white;
  color: var(--text-light);
  font-weight: 900;
  cursor: pointer;
}

.mode-btn.active,
.preview-btn.active {
  background: var(--gradient);
  color: var(--text);
  border-color: transparent;
}

.builder-box {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(233, 137, 209, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(
      135deg,
      rgba(233, 137, 209, 0.08),
      rgba(255, 255, 255, 0.9),
      rgba(174, 155, 235, 0.08)
    );
}

.preview-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

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

.preview-header h3 {
  margin: 6px 0 0;
}

.email-preview-frame {
  min-height: 520px;
  border: 1px solid rgba(233, 137, 209, 0.22);
  border-radius: 24px;
  background: white;
  padding: 20px;
  overflow: auto;
}

.email-preview-empty {
  min-height: 420px;
  display: grid;
  place-items: center;
  color: var(--text-light);
  font-weight: 800;
  text-align: center;
}

.mobile-preview {
  max-width: 390px;
  margin: 0 auto;
}

@media (max-width: 980px) {
  .builder-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .email-tabs {
    width: 100%;
  }

  .email-tab {
    min-height: 50px;
    font-size: 0.92rem;
  }

  .panel-header,
  .preview-header {
    flex-direction: column;
  }

  .action-row button {
    width: 100%;
  }
}