
/* TAI247_AGENT_UI_V3_3_0_0
   UI-only modernization layer.
   No wallet, supplier, order or database behavior lives here.
*/

:root{
  --tai-bg:#f5f6f3;
  --tai-surface:#ffffff;
  --tai-surface-2:#f8f8f6;
  --tai-ink:#111214;
  --tai-muted:#71746f;
  --tai-line:#e7e8e3;
  --tai-yellow:#ffd21a;
  --tai-yellow-2:#f3c400;
  --tai-green:#138a58;
  --tai-green-soft:#e9f8f0;
  --tai-shadow:0 12px 35px rgba(18,20,18,.07);
  --tai-radius-xl:26px;
  --tai-radius-lg:20px;
  --tai-radius-md:16px;
}

body{
  background:var(--tai-bg)!important;
  color:var(--tai-ink);
  -webkit-font-smoothing:antialiased;
}

#appScreen{
  background:var(--tai-bg);
}

#view-home{
  max-width:1180px;
  margin:0 auto;
}

/* Header refinement */
.app-header,
.topbar,
header{
  backdrop-filter:saturate(1.08);
}

#view-home .page-head{
  margin-bottom:18px;
}

#view-home .page-head h2,
#view-home .page-head h1{
  letter-spacing:-.035em;
  font-weight:850;
}

/* Wallet hero */
#view-home .balance-card{
  position:relative;
  overflow:hidden;
  min-height:150px;
  padding:24px 26px!important;
  border-radius:26px!important;
  border:0!important;
  background:
    radial-gradient(circle at 90% 20%,rgba(255,210,26,.20),transparent 27%),
    linear-gradient(135deg,#0b0c0d,#17191b 70%,#202226)!important;
  box-shadow:0 18px 45px rgba(12,14,13,.16)!important;
}

#view-home .balance-card::after{
  content:"";
  position:absolute;
  width:210px;
  height:210px;
  border:1px solid rgba(255,210,26,.14);
  border-radius:50%;
  right:-70px;
  bottom:-120px;
}

#view-home .balance-card > span{
  font-size:13px;
  color:rgba(255,255,255,.72)!important;
  letter-spacing:.01em;
}

#view-home .balance-card > strong{
  display:block;
  margin-top:6px;
  font-size:clamp(34px,4vw,48px)!important;
  letter-spacing:-.04em;
  color:white!important;
}

#view-home .balance-card button{
  position:relative;
  z-index:2;
  border:none!important;
  border-radius:15px!important;
  min-height:46px;
  padding:0 18px!important;
  background:var(--tai-yellow)!important;
  color:#101112!important;
  font-weight:850!important;
  box-shadow:none!important;
}

/* Quick action rail */
.tai-v3-quick-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:16px 0 18px;
}

.tai-v3-quick-action{
  appearance:none;
  border:1px solid var(--tai-line);
  background:var(--tai-surface);
  border-radius:18px;
  padding:14px 10px 12px;
  min-height:92px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:9px;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(20,20,18,.035);
  transition:.18s ease;
}

.tai-v3-quick-action:hover{
  transform:translateY(-2px);
  box-shadow:var(--tai-shadow);
}

.tai-v3-quick-icon{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  background:#f1f2ef;
  color:#121316;
}

.tai-v3-quick-action:nth-child(1) .tai-v3-quick-icon{
  background:#fff4b6;
}

.tai-v3-quick-action span{
  font-size:12px;
  font-weight:750;
  color:#30322f;
}

/* Slider */
.tai-v3-slider{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  background:#101112;
  box-shadow:var(--tai-shadow);
  margin:4px 0 26px;
  min-height:270px;
}

.tai-v3-slider-track{
  position:relative;
  height:clamp(270px,31vw,390px);
}

.tai-v3-slide{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transform:scale(1.015);
  transition:opacity .55s ease,transform .65s ease,visibility .55s;
}

.tai-v3-slide.is-active{
  opacity:1;
  visibility:visible;
  transform:scale(1);
}

.tai-v3-slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
}

.tai-v3-slide-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  padding:clamp(24px,5vw,56px);
  background:linear-gradient(90deg,rgba(5,6,7,.90) 0%,rgba(5,6,7,.72) 38%,rgba(5,6,7,.14) 70%,rgba(5,6,7,.04) 100%);
}

.tai-v3-slide-copy{
  width:min(560px,64%);
  color:white;
}

.tai-v3-slide-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,210,26,.14);
  border:1px solid rgba(255,210,26,.35);
  color:#ffe66a;
  font-size:11px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tai-v3-slide h3{
  margin:14px 0 10px;
  font-size:clamp(28px,4.4vw,52px);
  line-height:.98;
  letter-spacing:-.045em;
  color:white;
}

.tai-v3-slide p{
  margin:0 0 18px;
  max-width:480px;
  color:rgba(255,255,255,.78);
  font-size:clamp(13px,1.8vw,16px);
  line-height:1.48;
}

.tai-v3-slide-cta{
  border:0;
  border-radius:14px;
  min-height:44px;
  padding:0 17px;
  background:var(--tai-yellow);
  color:#111;
  font-weight:850;
  cursor:pointer;
}

.tai-v3-slider-controls{
  position:absolute;
  left:clamp(24px,5vw,56px);
  bottom:20px;
  z-index:4;
  display:flex;
  align-items:center;
  gap:8px;
}

.tai-v3-dot{
  appearance:none;
  border:0;
  padding:0;
  width:8px;
  height:8px;
  border-radius:999px;
  background:rgba(255,255,255,.48);
  transition:.2s ease;
  cursor:pointer;
}

.tai-v3-dot.is-active{
  width:25px;
  background:var(--tai-yellow);
}

.tai-v3-slider-arrow{
  position:absolute;
  z-index:4;
  top:50%;
  transform:translateY(-50%);
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.24);
  border-radius:50%;
  background:rgba(11,12,13,.38);
  color:white;
  backdrop-filter:blur(8px);
  cursor:pointer;
  opacity:0;
  transition:.2s;
}

.tai-v3-slider:hover .tai-v3-slider-arrow{
  opacity:1;
}

.tai-v3-slider-arrow.prev{left:14px}
.tai-v3-slider-arrow.next{right:14px}

/* Service section */
#view-home .section-head{
  margin-top:14px;
}

#view-home .section-head h3{
  font-size:21px;
  letter-spacing:-.025em;
}

#businessProductGrid{
  display:grid!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:12px!important;
  align-items:stretch;
}

/* Registry cards become fintech service tiles */
#businessProductGrid .platform-product-card-v1{
  position:relative;
  min-width:0!important;
  min-height:154px!important;
  height:auto!important;
  padding:15px 10px 12px!important;
  border:1px solid var(--tai-line)!important;
  border-radius:19px!important;
  background:var(--tai-surface)!important;
  box-shadow:0 5px 18px rgba(18,20,18,.035)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:flex-start!important;
  text-align:center!important;
  gap:5px!important;
  overflow:hidden;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}

#businessProductGrid .platform-product-card-v1:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 28px rgba(18,20,18,.08)!important;
  border-color:#d7d9d2!important;
}

#businessProductGrid .business-product-icon{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  border-radius:15px!important;
  background:#111316!important;
  color:var(--tai-yellow)!important;
  display:grid!important;
  place-items:center!important;
  margin:0 0 4px!important;
  font-size:0!important;
}

#businessProductGrid .business-product-icon svg{
  width:27px;
  height:27px;
}

#businessProductGrid .business-product-copy{
  display:flex!important;
  min-width:0;
  width:100%;
  flex-direction:column;
  align-items:center;
  gap:2px;
}

#businessProductGrid .business-product-copy strong{
  order:2;
  display:block;
  max-width:100%;
  color:#151615;
  font-size:13px!important;
  line-height:1.15;
  font-weight:820!important;
  white-space:normal;
}

#businessProductGrid .business-product-copy small{
  order:3;
  display:block;
  max-width:100%;
  margin-top:2px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--tai-muted)!important;
  font-size:9.5px!important;
}

#businessProductGrid .business-product-badge{
  order:1;
  align-self:center;
  margin:0 0 3px!important;
  border-radius:999px!important;
  padding:3px 6px!important;
  font-size:7.5px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.045em;
}

#businessProductGrid .business-product-money{
  order:4;
  width:100%;
  margin-top:5px!important;
  padding-top:5px;
  display:flex!important;
  align-items:center;
  justify-content:center;
  gap:4px;
  border-top:1px solid #f0f1ed;
  font-size:9px!important;
}

#businessProductGrid .business-product-money span{
  color:#747770!important;
  font-size:9px!important;
}

#businessProductGrid .business-product-money b{
  color:var(--tai-green)!important;
  font-size:9.5px!important;
}

#businessProductGrid .platform-product-card-v1.tai-v3-coming .business-product-money{
  display:none!important;
}

#businessProductGrid .platform-product-card-v1.tai-v3-coming{
  min-height:136px!important;
}

#businessProductGrid .business-product-arrow{
  position:absolute;
  top:10px;
  right:10px;
  opacity:.34;
  font-size:15px!important;
}

#businessProductGrid .platform-product-card-v1.tai-v3-coming .business-product-arrow{
  display:none;
}

/* Existing stats */
#view-home .stats-grid{
  gap:12px!important;
  margin-top:24px!important;
}

#view-home .stats-grid > *{
  border:1px solid var(--tai-line)!important;
  border-radius:20px!important;
  background:white!important;
  padding:18px!important;
  box-shadow:0 5px 18px rgba(18,20,18,.025);
}

#view-home .stats-grid strong{
  font-size:27px!important;
  letter-spacing:-.035em;
}

/* Recent transaction rows */
#view-home .list .row,
#recentList .row{
  border:1px solid var(--tai-line)!important;
  border-radius:18px!important;
  background:white!important;
  margin-bottom:9px!important;
  box-shadow:0 4px 15px rgba(18,20,18,.025);
}

/* Airtime page polish */
#view-airtime .panel,
#airtimeSellPanel{
  border-radius:24px!important;
  border:1px solid var(--tai-line)!important;
  background:white!important;
  box-shadow:var(--tai-shadow)!important;
}

#airtimeSellPanel input,
#airtimeSellPanel select{
  border-radius:14px!important;
  border-color:#dfe1dc!important;
  min-height:52px;
}

#airtimeSellPanel button{
  border-radius:14px;
}

/* Bottom nav */
.bottom-nav{
  border-top:1px solid var(--tai-line)!important;
  background:rgba(255,255,255,.94)!important;
  backdrop-filter:blur(14px);
}

.bottom-nav button{
  color:#666a64!important;
}

.bottom-nav button.active{
  color:#111!important;
}

.bottom-nav button svg{
  width:21px;
  height:21px;
  display:block;
  margin:0 auto 4px;
}

/* Dynamic assisted products should at least share rounded card language */
.business-product-dynamic .business-product-card,
.business-product-card:not(.platform-product-card-v1){
  border-radius:19px!important;
  border-color:var(--tai-line)!important;
  box-shadow:0 5px 18px rgba(18,20,18,.03)!important;
}

@media(max-width:1050px){
  #businessProductGrid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

@media(max-width:720px){
  #view-home{
    padding-left:14px!important;
    padding-right:14px!important;
  }

  #view-home .balance-card{
    min-height:140px;
    padding:20px!important;
  }

  .tai-v3-quick-actions{
    gap:8px;
  }

  .tai-v3-quick-action{
    min-height:80px;
    padding:10px 5px;
  }

  .tai-v3-quick-icon{
    width:36px;
    height:36px;
    border-radius:12px;
  }

  .tai-v3-quick-action span{
    font-size:10px;
  }

  .tai-v3-slider{
    border-radius:20px;
    min-height:245px;
  }

  .tai-v3-slider-track{
    height:245px;
  }

  .tai-v3-slide-overlay{
    padding:24px 20px 45px;
    background:linear-gradient(90deg,rgba(5,6,7,.93),rgba(5,6,7,.67) 65%,rgba(5,6,7,.18));
  }

  .tai-v3-slide-copy{
    width:72%;
  }

  .tai-v3-slide h3{
    font-size:31px;
  }

  .tai-v3-slider-controls{
    left:20px;
    bottom:16px;
  }

  .tai-v3-slider-arrow{
    display:none;
  }

  #businessProductGrid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
  }

  #businessProductGrid .platform-product-card-v1{
    min-height:126px!important;
    border-radius:16px!important;
    padding:11px 5px 9px!important;
  }

  #businessProductGrid .business-product-icon{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    border-radius:13px!important;
  }

  #businessProductGrid .business-product-icon svg{
    width:23px;
    height:23px;
  }

  #businessProductGrid .business-product-copy strong{
    font-size:10.5px!important;
  }

  #businessProductGrid .business-product-copy small{
    display:none!important;
  }

  #businessProductGrid .business-product-badge{
    font-size:6.5px!important;
  }

  #businessProductGrid .business-product-money{
    font-size:7.5px!important;
  }

  #businessProductGrid .business-product-money span,
  #businessProductGrid .business-product-money b{
    font-size:7.5px!important;
  }
}
