/* ============================================
   NEXGEN DATA - PHASE 2
============================================ */

.nd2 {
  --nd-cyan:#00f5ff;
  --nd-purple:#a04cff;
  --nd-green:#16eda0;
  --nd-red:#ff537d;
  --nd-orange:#ffb142;
  --nd-bg:#030b16;
  --nd-panel:rgba(7,17,31,.88);
  --nd-border:rgba(0,245,255,.16);
  --nd-muted:#91a7bc;
  width:min(1180px,94%);
  margin:70px auto;
}

.nd2 *{box-sizing:border-box}

.nd2-kicker{
  color:var(--nd-cyan);
  font-weight:900;
  letter-spacing:.12em;
  font-size:12px;
}

.nd2-title{
  font-size:clamp(30px,4vw,48px);
  margin:8px 0 12px;
}

.nd2-lead{
  color:var(--nd-muted);
  line-height:1.7;
  max-width:850px;
}

.nd2-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.nd2-grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.nd2-card{
  min-width:0;
  padding:23px;
  border-radius:20px;
  border:1px solid var(--nd-border);
  background:
    radial-gradient(circle at 90% 10%,rgba(0,245,255,.05),transparent 35%),
    linear-gradient(145deg,rgba(8,18,34,.94),rgba(3,9,19,.94));
  box-shadow:0 18px 60px rgba(0,0,0,.22);
}

.nd2-card.popular{
  border-color:rgba(0,245,255,.5);
  box-shadow:0 0 35px rgba(0,245,255,.08);
}

.nd2-price{
  font-size:38px;
  font-weight:950;
  margin:8px 0;
}

.nd2-old{
  text-decoration:line-through;
  color:#6d8399;
}

.nd2-renewal{
  color:#8fa5ba;
  font-size:13px;
  margin-top:7px;
}

.nd2-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  padding:6px 9px;
  border-radius:30px;
  border:1px solid rgba(255,255,255,.13);
}

.nd2-badge.live,
.nd2-badge.completed{
  color:#23f0a4;
  border-color:rgba(35,240,164,.32);
  background:rgba(35,240,164,.06);
}

.nd2-badge.beta,
.nd2-badge.processing,
.nd2-badge.popular{
  color:#00f5ff;
  border-color:rgba(0,245,255,.32);
  background:rgba(0,245,255,.06);
}

.nd2-badge.soon,
.nd2-badge.business{
  color:#c998ff;
  border-color:rgba(201,152,255,.30);
  background:rgba(160,76,255,.06);
}

.nd2-badge.failed{
  color:#ff668b;
  border-color:rgba(255,102,139,.32);
}

.nd2-badge.pro{
  color:#ffca61;
  border-color:rgba(255,202,97,.3);
}

.nd2-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  min-height:45px;
  padding:11px 17px;
  border-radius:11px;
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
  color:#fff;
  background:linear-gradient(90deg,#00c9e3,#7156ff);
}

.nd2-btn.secondary{
  color:#00f5ff;
  border:1px solid rgba(0,245,255,.3);
  background:transparent;
}

.nd2-btn:disabled{
  cursor:not-allowed;
  opacity:.55;
  filter:grayscale(.2);
}

.nd2-field{
  margin-bottom:17px;
}

.nd2-field label{
  display:block;
  color:#d9e8f5;
  margin-bottom:7px;
  font-weight:800;
  font-size:13px;
}

.nd2-field input,
.nd2-field select{
  width:100%;
  min-height:47px;
  padding:11px 13px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  outline:none;
  color:#eaf6ff;
  background:#06111f;
}

.nd2-field input:focus,
.nd2-field select:focus{
  border-color:rgba(0,245,255,.6);
  box-shadow:0 0 0 3px rgba(0,245,255,.05);
}

.nd2-checks{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:9px;
}

.nd2-check{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  padding:9px;
  border-radius:9px;
  background:rgba(255,255,255,.025);
  color:#afc1d2;
}

.nd2-check input{accent-color:#00f5ff}

.nd2-message{
  display:none;
  margin-top:14px;
  padding:13px;
  border-radius:10px;
  border:1px solid rgba(0,245,255,.18);
  color:#b9d0e2;
  background:rgba(0,245,255,.04);
}

.nd2-message.show{display:block}

.nd2-progress{
  width:100%;
  height:10px;
  border-radius:30px;
  background:#071421;
  overflow:hidden;
  margin-top:10px;
}

.nd2-progress span{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,#00f5ff,#895cff);
}

.nd2-table-wrap{
  width:100%;
  overflow-x:auto;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
}

.nd2-table{
  width:100%;
  min-width:930px;
  border-collapse:collapse;
}

.nd2-table th,
.nd2-table td{
  text-align:left;
  padding:13px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.nd2-table th{
  color:#9fb3c7;
  font-size:12px;
  letter-spacing:.06em;
}

.nd2-demo{
  border:1px dashed rgba(255,190,80,.32);
  background:rgba(255,190,80,.035);
  color:#d7b46f;
  padding:10px 13px;
  border-radius:10px;
  margin:15px 0;
}

.nd2-account[hidden]{display:none!important}

.nd2-stat{
  padding:15px;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.025);
}

.nd2-stat small{
  color:#7f96ab;
  display:block;
  margin-bottom:5px;
}

.nd2-stat strong{
  color:#fff;
  word-break:break-word;
}

.nd2-credits-public{
  padding:18px;
  border-radius:15px;
  border:1px solid rgba(0,245,255,.15);
  background:rgba(0,245,255,.035);
}

.nd2-cap{
  display:flex;
  justify-content:space-between;
  gap:13px;
  padding:9px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
  color:#9eb3c5;
}

.nd2-cap strong{
  color:#e7f3fc;
  text-align:right;
}

.nd2-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

@media(max-width:1024px){
  .nd2-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .nd2-checks{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:768px){
  .nd2-grid,
  .nd2-grid-2{grid-template-columns:1fr}
}

@media(max-width:430px){
  .nd2{width:min(94%,100%)}
  .nd2-checks{grid-template-columns:1fr}
  .nd2-card{padding:17px}
  .nd2-price{font-size:32px}
  .nd2-btn{width:100%}
}

@media(max-width:320px){
  .nd2-card{padding:14px}
}

/* ===== NEXGEN DATA PREMIUM PLAN UI ===== */

.nd2-plan-card{
  position:relative;
  overflow:hidden;
  padding:28px;
}

.nd2-plan-card.popular{
  border-color:#00d8ff;
  box-shadow:
    0 0 0 1px rgba(0,216,255,.22),
    0 20px 55px rgba(0,170,255,.12);
}

.nd2-plan-name{
  margin-top:16px;
  font-size:24px;
  font-weight:800;
  letter-spacing:.5px;
}

.nd2-plan-card .nd2-old{
  margin-top:18px;
  opacity:.55;
  text-decoration:line-through;
  font-size:18px;
}

.nd2-plan-card .nd2-price{
  margin-top:4px;
  font-size:42px;
  line-height:1.1;
  font-weight:900;
  color:#f4fbff;
}

.nd2-plan-card .nd2-price small{
  font-size:14px;
  color:#8fa7bd;
  font-weight:600;
}

.nd2-plan-card .custom-price{
  margin-top:25px;
}

.nd2-plan-card .nd2-renewal{
  margin-top:8px;
  color:#9cb1c6;
}

.nd2-plan-usage{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:24px 0 20px;
}

.nd2-plan-usage div{
  padding:13px 8px;
  border:1px solid rgba(77,139,190,.2);
  background:rgba(5,17,31,.55);
  border-radius:10px;
  text-align:center;
}

.nd2-plan-usage strong{
  display:block;
  font-size:18px;
  color:#fff;
}

.nd2-plan-usage span{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:#8ea5bb;
}

.nd2-feature-list{
  list-style:none;
  padding:0;
  margin:20px 0 24px;
}

.nd2-feature-list li{
  padding:8px 0;
  color:#c9d8e7;
  border-bottom:1px solid rgba(255,255,255,.045);
}

.nd2-feature-list li::first-letter{
  color:#00e5ff;
}

.nd2-plan-card .nd2-actions{
  margin-top:auto;
}

.nd2-plan-card .nd2-btn{
  width:100%;
  text-align:center;
}

@media(max-width:700px){
  .nd2-plan-usage{
    grid-template-columns:1fr;
  }

  .nd2-plan-card .nd2-price{
    font-size:36px;
  }
}



/* ===== NEXGEN DATA AUTH UI ===== */

.nd2-auth-grid{
  align-items:stretch;
}

.nd2-auth-grid .nd2-card{
  padding:24px;
}

.nd2-auth-state{
  margin-top:18px;
  padding:13px 15px;
  border:1px solid rgba(104,145,181,.25);
  border-radius:9px;
  background:rgba(5,15,27,.6);
  color:#9eb3c8;
}

.nd2-auth-state.success{
  border-color:rgba(0,229,255,.35);
  color:#7defff;
}

#nd2-logout{
  margin-top:12px;
  width:auto;
}



/* =========================================================
   NEXGEN DATA ACCOUNT STATUS
   ========================================================= */

.nd2-account-overview{
  margin-top:24px;
  padding:22px;
  border:1px solid rgba(67,203,255,.18);
  border-radius:16px;
  background:
    linear-gradient(
      180deg,
      rgba(15,30,50,.84),
      rgba(7,16,29,.9)
    );
}

.nd2-account-summary{
  display:grid;
  grid-template-columns:
    repeat(4,minmax(0,1fr));
  gap:12px;
}

.nd2-account-summary > div{
  padding:14px;
  border-radius:12px;
  background:rgba(255,255,255,.035);
  border:1px solid rgba(255,255,255,.06);
}

.nd2-account-summary small{
  display:block;
  margin-bottom:7px;
  color:#7e91a8;
  font-size:11px;
  letter-spacing:.08em;
}

.nd2-account-summary strong{
  color:#f3fbff;
  font-size:17px;
}

.nd2-account-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

.nd2-account-actions .nd2-btn{
  width:auto;
  min-width:170px;
}

#nd2-access-countdown{
  color:#58d8ff;
}

#nd2-credits-remaining{
  color:#8cf1b2;
}

@media(max-width:900px){
  .nd2-account-summary{
    grid-template-columns:
      repeat(2,minmax(0,1fr));
  }
}

@media(max-width:560px){
  .nd2-account-summary{
    grid-template-columns:1fr;
  }

  .nd2-account-actions .nd2-btn{
    width:100%;
  }
}


/* =========================================================
   NEXGEN DATA AUTH VISIBILITY
   ========================================================= */

/* Signed-out default */
body:not(.nd-authenticated) #nd2-signout,
body:not(.nd-authenticated) #nd2-account-overview,
body:not(.nd-authenticated) #nd2-start-trial,
body:not(.nd-authenticated) #nd2-renew-plan,
body:not(.nd-authenticated) #nd2-account,
body:not(.nd-authenticated) .nd2-private-account{
  display:none !important;
}

/* Signed-in */
body.nd-authenticated #nd2-signout{
  display:inline-flex !important;
}

/* No access */
body.nd-authenticated.nd-access-none #nd2-start-trial{
  display:inline-flex !important;
}

body.nd-authenticated.nd-access-none #nd2-renew-plan{
  display:none !important;
}

/* Trial */
body.nd-authenticated.nd-access-trial #nd2-start-trial{
  display:none !important;
}

body.nd-authenticated.nd-access-trial #nd2-renew-plan{
  display:inline-flex !important;
}

/* Paid */
body.nd-authenticated.nd-access-paid #nd2-start-trial{
  display:none !important;
}

body.nd-authenticated.nd-access-paid #nd2-renew-plan{
  display:inline-flex !important;
}


/* =========================================================
   NEXGEN DATA - SAAS STATE SYSTEM
   ========================================================= */

/* signed out */
body:not(.nd-authenticated) #nd2-account-overview,
body:not(.nd-authenticated) #nd2-signout,
body:not(.nd-authenticated) #nd2-start-trial,
body:not(.nd-authenticated) #nd2-renew-plan,
body:not(.nd-authenticated) #nd2-account,
body:not(.nd-authenticated) .nd2-private-account,
body:not(.nd-authenticated) .nd2-private-controls {
  display:none !important;
}

/* signed in */
body.nd-authenticated #nd2-signout {
  display:inline-flex !important;
}

/* no-plan state */
body.nd-authenticated.nd-access-none #nd2-account-overview {
  display:block !important;
}

body.nd-authenticated.nd-access-none #nd2-start-trial {
  display:inline-flex !important;
}

body.nd-authenticated.nd-access-none #nd2-renew-plan {
  display:none !important;
}

/* trial */
body.nd-authenticated.nd-access-trial #nd2-account-overview {
  display:block !important;
}

body.nd-authenticated.nd-access-trial #nd2-start-trial {
  display:none !important;
}

body.nd-authenticated.nd-access-trial #nd2-renew-plan {
  display:inline-flex !important;
}

/* paid */
body.nd-authenticated.nd-access-paid #nd2-account-overview {
  display:block !important;
}

body.nd-authenticated.nd-access-paid #nd2-start-trial {
  display:none !important;
}

body.nd-authenticated.nd-access-paid #nd2-renew-plan {
  display:inline-flex !important;
}

/* account overview premium */
.nd2-account-overview {
  margin-top:24px;
  padding:20px;
  border:1px solid rgba(102,190,255,.14);
  border-radius:20px;
  background:
    radial-gradient(circle at 100% 0,rgba(79,109,255,.12),transparent 38%),
    rgba(8,19,34,.72);
}

.nd2-account-overview .nd2-grid {
  gap:12px;
}

.nd2-account-overview .nd2-stat {
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border:1px solid rgba(118,194,255,.1);
  background:rgba(255,255,255,.022);
}

/* signed-out auth area */
body:not(.nd-authenticated) .nd2-auth-grid {
  margin-top:18px;
}

/* mobile */
@media(max-width:860px) {

  .nd2-auth-grid {
    grid-template-columns:1fr !important;
  }

  .nd2-account-overview {
    padding:15px;
    border-radius:18px;
  }

  .nd2-account-overview .nd2-grid {
    grid-template-columns:1fr 1fr !important;
  }

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

  .nd2-plan-usage {
    grid-template-columns:repeat(3,1fr) !important;
    gap:8px !important;
  }

  .nd2-plan-usage div {
    min-width:0;
  }
}

@media(max-width:520px) {

  .nd2-account-overview .nd2-grid {
    grid-template-columns:1fr !important;
  }

  .nd2-plan-usage {
    grid-template-columns:1fr !important;
  }

  .nd2-actions {
    flex-direction:column !important;
  }

  .nd2-actions .nd2-btn {
    width:100% !important;
  }
}
