
/* ACS OPS UI V13 FINAL FIX — clearer color grading, no double bottom icons, billing admin button */

:root{
  --acs-red:#c8191f;
  --acs-red-dark:#991b1f;
  --acs-ink:#08111f;
  --acs-muted:#5f6b7a;
  --acs-line:rgba(15,23,42,.12);
  --acs-soft:#f5f7fb;
  --acs-card:#ffffff;
}

html,body{
  color:var(--acs-ink) !important;
  background:
    radial-gradient(circle at top left, rgba(200,25,31,.10), transparent 34rem),
    radial-gradient(circle at top right, rgba(15,23,42,.10), transparent 40rem),
    linear-gradient(180deg,#f7f9fc,#eef2f7) !important;
}

body{
  padding-bottom:92px !important;
}

/* Make the washed out hero banners readable */
body:not(.billing-page) .hero,
body:not(.billing-page) .page-hero,
body:not(.billing-page) .admin-hero,
body:not(.billing-page) .dashboard-hero,
body:not(.billing-page) .hero-card,
body:not(.billing-page) .hero-panel{
  background:
    linear-gradient(135deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.96) 52%, rgba(200,25,31,.16) 100%) !important;
  color:var(--acs-ink) !important;
  border:1px solid rgba(15,23,42,.10) !important;
  box-shadow:0 18px 48px rgba(15,23,42,.12) !important;
}

body:not(.billing-page) .hero h1,
body:not(.billing-page) .page-hero h1,
body:not(.billing-page) .admin-hero h1,
body:not(.billing-page) .dashboard-hero h1,
body:not(.billing-page) .hero-card h1,
body:not(.billing-page) .hero-panel h1,
body:not(.billing-page) .hero .title,
body:not(.billing-page) .page-hero .title{
  color:var(--acs-ink) !important;
  text-shadow:none !important;
  opacity:1 !important;
}

body:not(.billing-page) .hero p,
body:not(.billing-page) .page-hero p,
body:not(.billing-page) .admin-hero p,
body:not(.billing-page) .dashboard-hero p,
body:not(.billing-page) .hero-card p,
body:not(.billing-page) .hero-panel p{
  color:var(--acs-muted) !important;
  opacity:1 !important;
}

/* Cards/forms clearer */
.card,
.panel,
.stat-card,
.metric,
.form-card,
.glass-card,
.table-card,
section.card{
  background:rgba(255,255,255,.96) !important;
  color:var(--acs-ink) !important;
  border:1px solid rgba(15,23,42,.10) !important;
  box-shadow:0 18px 42px rgba(15,23,42,.10) !important;
}

input,
select,
textarea{
  color:var(--acs-ink) !important;
  background:#fff !important;
  border:1px solid rgba(15,23,42,.16) !important;
}

input::placeholder,
textarea::placeholder{
  color:#6b7280 !important;
  opacity:1 !important;
}

textarea{
  min-height:88px !important;
}

/* Top bar */
.topbar{
  background:linear-gradient(90deg,#121722,#0b1220 70%,#2a0d13) !important;
  border-bottom:1px solid rgba(255,255,255,.08) !important;
}

.topbar .brand-name,
.topbar .brand,
.topbar span{
  color:#fff !important;
}

/* Clean bottom nav, remove double icons */
.bottombar,
.acs-bottom-nav{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  z-index:9999 !important;
  display:grid !important;
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:8px !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  background:rgba(16,18,24,.96) !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 -18px 44px rgba(0,0,0,.30) !important;
  backdrop-filter:blur(18px) !important;
}

.bottombar .navitem::before,
.acs-bottom-nav .navitem::before,
.bottom-tabs a::before,
.billing-bottom-tabs a::before{
  content:none !important;
  display:none !important;
}

.bottombar .navitem,
.acs-bottom-nav .navitem{
  min-width:0 !important;
  height:52px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  flex-direction:column !important;
  gap:3px !important;
  border-radius:16px !important;
  text-decoration:none !important;
  color:#cbd5e1 !important;
  background:rgba(255,255,255,.045) !important;
  border:1px solid rgba(255,255,255,.055) !important;
  font-weight:900 !important;
  overflow:hidden !important;
}

.bottombar .navitem.active,
.acs-bottom-nav .navitem.active{
  color:#fff !important;
  background:linear-gradient(135deg,var(--acs-red),var(--acs-red-dark)) !important;
  border-color:rgba(255,255,255,.14) !important;
  box-shadow:0 12px 28px rgba(200,25,31,.28) !important;
}

.nav-ico{
  display:block !important;
  font-size:17px !important;
  line-height:1 !important;
}

.nav-label{
  display:block !important;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:11px !important;
  line-height:1.05 !important;
}

/* Billing snapshot page */
body.billing-page{
  background:
    radial-gradient(circle at top left, rgba(200,25,31,.14), transparent 36rem),
    linear-gradient(180deg,#f7f9fc,#eef2f7) !important;
  color:var(--acs-ink) !important;
  padding-bottom:96px !important;
}

body.billing-page .shell{
  max-width:1180px !important;
  margin:0 auto !important;
  padding:18px 14px 110px !important;
}

body.billing-page .hero{
  background:linear-gradient(135deg,#0b1220 0%,#121a2a 62%,#7f1117 140%) !important;
  color:#fff !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:0 20px 55px rgba(15,23,42,.22) !important;
  border-radius:26px !important;
  padding:22px !important;
  margin-bottom:18px !important;
}

body.billing-page .hero h1,
body.billing-page .hero h2,
body.billing-page .hero h3,
body.billing-page .hero .brand,
body.billing-page .hero .addr{
  color:#fff !important;
  opacity:1 !important;
  text-shadow:0 1px 2px rgba(0,0,0,.20) !important;
}

body.billing-page .hero .addr,
body.billing-page .hero .brand{
  color:rgba(255,255,255,.76) !important;
}

body.billing-page .actions,
body.billing-page .billing-actions{
  display:flex !important;
  gap:8px !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
}

body.billing-page .btn,
body.billing-page button.btn,
body.billing-page a.btn{
  min-height:42px !important;
  border-radius:14px !important;
  padding:10px 14px !important;
  font-weight:950 !important;
  text-decoration:none !important;
  border:1px solid rgba(15,23,42,.12) !important;
  background:#fff !important;
  color:var(--acs-ink) !important;
  box-shadow:0 10px 22px rgba(15,23,42,.12) !important;
}

body.billing-page .email-card,
body.billing-page .card{
  background:rgba(255,255,255,.98) !important;
  color:var(--acs-ink) !important;
  border:1px solid rgba(15,23,42,.10) !important;
  border-radius:24px !important;
  box-shadow:0 18px 45px rgba(15,23,42,.11) !important;
}

body.billing-page .email-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  gap:10px !important;
  align-items:start !important;
}

body.billing-page .email-card textarea{
  width:100% !important;
  min-height:86px !important;
  resize:vertical !important;
}

body.billing-page .email-card button,
body.billing-page .email-card .btn-primary{
  background:linear-gradient(135deg,var(--acs-red),var(--acs-red-dark)) !important;
  color:#fff !important;
  border:0 !important;
  box-shadow:0 16px 30px rgba(200,25,31,.25) !important;
}

body.billing-page .metrics{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:12px !important;
}

body.billing-page .metric{
  grid-column:auto !important;
  min-width:0 !important;
  padding:15px !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#fff,#f8fafc) !important;
}

body.billing-page .metric .label{
  color:#64748b !important;
  font-size:11px !important;
  letter-spacing:.08em !important;
}

body.billing-page .metric .value{
  color:var(--acs-ink) !important;
  font-size:1.35rem !important;
}

body.billing-page .metric.profit .value,
body.billing-page .metric .value[style*="green"]{
  color:#137a3a !important;
}

.billing-bottom-tabs{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  bottom:0 !important;
  z-index:9999 !important;
  display:grid !important;
  grid-template-columns:repeat(6,minmax(0,1fr)) !important;
  gap:7px !important;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom)) !important;
  background:rgba(16,18,24,.96) !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 -18px 44px rgba(0,0,0,.30) !important;
  backdrop-filter:blur(18px) !important;
}

.billing-bottom-tabs a{
  height:52px !important;
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  gap:3px !important;
  border-radius:16px !important;
  text-decoration:none !important;
  color:#cbd5e1 !important;
  background:rgba(255,255,255,.045) !important;
  border:1px solid rgba(255,255,255,.055) !important;
  font-weight:900 !important;
  overflow:hidden !important;
}

.billing-bottom-tabs a.active{
  color:#fff !important;
  background:linear-gradient(135deg,var(--acs-red),var(--acs-red-dark)) !important;
  border-color:rgba(255,255,255,.14) !important;
  box-shadow:0 12px 28px rgba(200,25,31,.28) !important;
}

.billing-bottom-tabs .tab-ico{
  font-size:16px !important;
  line-height:1 !important;
}

.billing-bottom-tabs .tab-label{
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
  font-size:10.5px !important;
  line-height:1.05 !important;
}

/* Phone compression */
@media(max-width:760px){
  body{
    padding-bottom:86px !important;
  }

  .container,
  .shell,
  main.container{
    width:100% !important;
    max-width:100% !important;
    padding-left:10px !important;
    padding-right:10px !important;
  }

  .bottombar,
  .acs-bottom-nav{
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:5px !important;
    padding-left:6px !important;
    padding-right:6px !important;
  }

  .bottombar .navitem,
  .acs-bottom-nav .navitem{
    height:48px !important;
    border-radius:13px !important;
  }

  .nav-ico{
    font-size:15px !important;
  }

  .nav-label{
    font-size:9.5px !important;
  }

  body.billing-page .shell{
    padding:10px 8px 96px !important;
  }

  body.billing-page .hero{
    border-radius:20px !important;
    padding:16px !important;
  }

  body.billing-page .actions,
  body.billing-page .billing-actions{
    justify-content:stretch !important;
  }

  body.billing-page .actions .btn,
  body.billing-page .billing-actions .btn{
    flex:1 1 44% !important;
    text-align:center !important;
    padding:9px 8px !important;
    font-size:12px !important;
  }

  body.billing-page .email-row{
    grid-template-columns:1fr !important;
  }

  body.billing-page .email-card button{
    width:100% !important;
  }

  body.billing-page .metrics{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  body.billing-page .metric{
    padding:12px !important;
    border-radius:16px !important;
  }

  body.billing-page .metric .value{
    font-size:1.05rem !important;
  }

  .billing-bottom-tabs{
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:4px !important;
    padding-left:5px !important;
    padding-right:5px !important;
  }

  .billing-bottom-tabs a{
    height:48px !important;
    border-radius:13px !important;
  }

  .billing-bottom-tabs .tab-ico{
    font-size:14px !important;
  }

  .billing-bottom-tabs .tab-label{
    font-size:8.5px !important;
  }
}

@media(print){
  .bottombar,
  .acs-bottom-nav,
  .bottom-tabs,
  .billing-bottom-tabs,
  .topbar,
  .actions,
  .billing-actions,
  .email-card{
    display:none !important;
  }

  body,
  body.billing-page{
    background:#fff !important;
    padding-bottom:0 !important;
  }

  body.billing-page .hero{
    background:#fff !important;
    color:#000 !important;
    box-shadow:none !important;
    border:1px solid #ddd !important;
  }

  body.billing-page .hero *{
    color:#000 !important;
    text-shadow:none !important;
  }
}
