/* Captain-approved BIY cyan / lighter navy shared client portal theme.
   Shared on the 11 portal routes. BIY watermark exists ONLY in .messages-thread. */
body.portal-theme{
  background:
    radial-gradient(ellipse 60% 42% at 76% 8%, rgba(0,145,225,.19),transparent 72%),
    radial-gradient(ellipse 50% 60% at 8% 88%, rgba(0,194,255,.08),transparent 80%),
    #071729;
}
.portal-theme .topbar{
  background:linear-gradient(110deg,#071626 0%,#0c3150 43%,#092139 72%,#061626 100%);
  border-bottom-color:rgba(82,211,255,.46);
  box-shadow:0 4px 26px rgba(0,14,37,.24),inset 0 -1px 0 rgba(95,212,255,.06);
}
.portal-theme .topbar::after{border-top-color:rgba(95,212,255,.72);box-shadow:0 -7px 30px rgba(0,194,255,.13)}
.portal-theme .sidebar{
  background:linear-gradient(163deg,#0a2a46 0%,#092239 43%,#0b3152 74%,#071b30 100%);
  border-right-color:rgba(78,200,245,.28);
  box-shadow:inset -18px 0 46px rgba(0,7,22,.16);
}
.portal-theme .sidebar .nav-item{
  background:linear-gradient(125deg,rgba(17,56,88,.74),rgba(10,33,60,.65));
  border-color:rgba(95,212,255,.24);
  box-shadow:inset 0 1px 0 rgba(184,235,255,.045);
}
.portal-theme .sidebar .nav-item.active{
  background:linear-gradient(110deg,rgba(0,171,233,.19),rgba(13,61,101,.45));
  border-color:#00c2ff;
  box-shadow:0 0 20px rgba(0,194,255,.2),inset 0 0 23px rgba(0,194,255,.06);
}
.portal-theme .main{
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(ellipse 64% 45% at 74% 12%,rgba(14,111,179,.33),transparent 82%),
    radial-gradient(ellipse 37% 45% at 3% 85%,rgba(10,120,195,.23),transparent 78%),
    linear-gradient(119deg,#071b30 0%,#0b2b49 46%,#08243e 65%,#06192d 100%);
}
.portal-theme .main::before{
  content:"";position:absolute;z-index:-1;inset:0;pointer-events:none;
  background:
    linear-gradient(108deg,transparent 42%,rgba(23,104,158,.085) 53%,transparent 65%),
    repeating-linear-gradient(90deg,transparent 0,transparent 77px,rgba(95,212,255,.016) 78px,transparent 79px),
    repeating-linear-gradient(0deg,transparent 0,transparent 77px,rgba(95,212,255,.012) 78px,transparent 79px);
}
.portal-theme .main::after{
  content:"";position:absolute;z-index:-1;pointer-events:none;
  width:84%;height:86%;right:-28%;top:-38%;
  border:1px solid rgba(0,194,255,.14);border-radius:50%;
  transform:rotate(-23deg);box-shadow:0 0 0 64px rgba(0,194,255,.013),0 0 0 136px rgba(0,194,255,.012);
}
.portal-theme .circuit{opacity:.16}
.portal-theme h1 .name{color:#00c2ff;text-shadow:0 0 30px rgba(0,194,255,.13)}
.portal-theme .card{
  border-color:rgba(54,188,240,.56);
  background:linear-gradient(132deg,rgba(12,49,79,.94) 0%,rgba(9,37,65,.94) 52%,rgba(7,31,57,.94) 100%);
  box-shadow:inset 0 1px 0 rgba(170,227,255,.1),0 12px 36px rgba(0,8,24,.17);
  backdrop-filter:blur(5px);
}
.portal-theme .project{
  background:linear-gradient(139deg,rgba(12,57,87,.96),rgba(8,37,67,.94) 51%,rgba(8,31,56,.95));
}
.portal-theme .next{
  background:
    radial-gradient(ellipse at 54% 34%,rgba(8,91,155,.19),transparent 54%),
    linear-gradient(130deg,rgba(11,54,88,.94),rgba(7,34,61,.96));
}
.portal-theme .meta{
  background:linear-gradient(125deg,rgba(18,65,105,.51),rgba(13,42,73,.7));
  border-color:rgba(95,212,255,.33);
}
.portal-theme .track{background:#0b2946;border-color:rgba(141,213,243,.53)}
.portal-theme .fill{box-shadow:0 0 16px rgba(0,194,255,.58)}
.portal-theme .grid-actions .action{
  position:relative;overflow:hidden;
  background:linear-gradient(143deg,rgba(11,52,86,.94),rgba(8,34,61,.96) 67%,rgba(6,29,55,.96));
  border-color:rgba(34,174,227,.48);
  box-shadow:inset 0 1px 0 rgba(164,224,255,.10),0 10px 28px rgba(0,10,24,.12);
  transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease;
}
.portal-theme .grid-actions .action:hover{
  transform:translateY(-2px);border-color:rgba(95,212,255,.77);
  box-shadow:0 14px 34px rgba(0,17,39,.22),0 0 20px rgba(0,194,255,.10);
}
.portal-theme .action p,.portal-theme .project-sub,.portal-theme .next p{color:#c4d6e5}
.portal-theme .round{background:rgba(0,194,255,.12)}
.portal-theme .badge.cyan{background:rgba(0,194,255,.11)}
.portal-theme .recent{background:linear-gradient(125deg,rgba(10,47,76,.95),rgba(8,31,57,.95))}
.portal-theme #messageModal .modal-panel{position:relative;overflow:hidden;background:linear-gradient(145deg,#0d3554,#082139)}
@media(max-width:900px),(hover:none) and (pointer:coarse){
  .portal-theme .sidebar{background:linear-gradient(110deg,#09253c,#0a3050)}
  .portal-theme .main{background:radial-gradient(ellipse 90% 44% at 80% 0%,rgba(12,107,164,.28),transparent),linear-gradient(150deg,#091e33,#0a2946 60%,#071d34)}
  .portal-theme .main::after{opacity:.55}
}
@media(prefers-reduced-motion:reduce){.portal-theme .grid-actions .action{transition:none}}


/* Keep backgrounds in the same BIY palette across route-specific containers. */
body.portal-theme .hero-copy,
body.portal-theme .hero-note,
body.portal-theme .messages-status,
body.portal-theme .services-main .service-card,
body.portal-theme .services-main .cart-card,
body.portal-theme .services-main .scope-card,
body.portal-theme .services-main .catalog-toolbar,
body.portal-theme .services-main .catalog-card,
body.portal-theme .services-main .rail-card,
body.portal-theme .services-main .lane,
body.portal-theme .services-main .section-card,
body.portal-theme .services-main .service-detail,
body.portal-theme .discovery-portal .hero-copy,
body.portal-theme .discovery-portal .hero-note {
  border-color:rgba(68,195,238,.44);
  background:linear-gradient(140deg,rgba(13,51,81,.95),rgba(8,32,58,.97));
  box-shadow:inset 0 1px 0 rgba(184,232,255,.06),0 14px 34px rgba(0,10,30,.16);
}
body.portal-theme .messages-shell {
  border-color:rgba(70,200,247,.53);
  background:linear-gradient(155deg,rgba(11,47,78,.98),rgba(6,27,51,.98));
  box-shadow:inset 0 1px 0 rgba(184,232,255,.075),0 25px 65px rgba(0,11,31,.24);
}
body.portal-theme .messages-shell-head {
  background:linear-gradient(105deg,rgba(0,194,255,.075),rgba(17,98,149,.08));
}
/* Only Messages page conversation. Under the bubbles; never in the composer. */
body.portal-theme .messages-thread {
  position:relative;
  isolation:isolate;
  background:radial-gradient(ellipse 65% 70% at 53% 47%,rgba(0,130,207,.075),transparent 75%);
}
body.portal-theme .messages-thread::before {
  content:"BIY";
  position:absolute;
  z-index:0;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  user-select:none;
  color:rgba(95,212,255,.085);
  font:800 clamp(120px,24vw,410px)/1 "Plus Jakarta Sans",sans-serif;
  letter-spacing:-.085em;
  white-space:nowrap;
  text-shadow:0 0 75px rgba(0,194,255,.035);
}
body.portal-theme .messages-thread > * {
  position:relative;
  z-index:1;
}
body.portal-theme .messages-compose {
  background:linear-gradient(110deg,rgba(5,28,48,.85),rgba(7,33,58,.91));
}
body.portal-theme .message-bubble {
  box-shadow:0 4px 18px rgba(0,13,36,.15);
}
/* Standalone Mission Prep does not use the shared dashboard sidebar. */
body.portal-theme .intake-page {
  background:
    radial-gradient(ellipse 52% 43% at 83% 7%,rgba(17,123,183,.19),transparent 75%),
    radial-gradient(ellipse 43% 47% at 6% 86%,rgba(0,194,255,.10),transparent 76%),
    linear-gradient(140deg,#0a2138 0%,#0b3050 54%,#071b31 100%);
}
body.portal-theme .intake-hero,
body.portal-theme .prep-rail,
body.portal-theme .prep-panel,
body.portal-theme .hero-status,
body.portal-theme .intake-page .note {
  border-color:rgba(73,189,234,.40);
  background:linear-gradient(140deg,rgba(12,48,78,.96),rgba(8,31,56,.98));
  box-shadow:inset 0 1px 0 rgba(184,232,255,.065),0 10px 30px rgba(0,10,30,.14);
}
/* Consistent pale cyan accents without flattening semantic success/warning badges. */
body.portal-theme .service-card,
body.portal-theme .project-panel,
body.portal-theme .approval-card,
body.portal-theme .payments-card,
body.portal-theme .booking-card,
body.portal-theme .automation-card,
body.portal-theme .discovery-card,
body.portal-theme .summary-card,
body.portal-theme .panel,
body.portal-theme .workspace-card,
body.portal-theme .rail-card {
  border-color:rgba(68,195,238,.35);
  box-shadow:inset 0 1px 0 rgba(184,232,255,.045),0 9px 30px rgba(0,11,31,.12);
}
/* Standalone signed-out route is still part of the 11-route theme. */
body.portal-theme .status {
  border:1px solid rgba(95,212,255,.22);
  background:linear-gradient(137deg,rgba(11,54,87,.82),rgba(7,31,56,.88));
  padding:26px 32px;
  border-radius:14px;
  box-shadow:0 20px 45px rgba(0,10,30,.2);
}
/* Existing client-selected Light preference must remain usable. */
html[data-theme="light"] body.portal-theme,
html[data-theme="light"] body.portal-theme .main,
html[data-theme="light"] body.portal-theme .intake-page {
  background:#f4f8fb;
}
html[data-theme="light"] body.portal-theme .card,
html[data-theme="light"] body.portal-theme .action,
html[data-theme="light"] body.portal-theme .sidebar,
html[data-theme="light"] body.portal-theme .topbar {
  color:#102033;
  background:#fff;
  border-color:#d4e2eb;
  box-shadow:none;
}
html[data-theme="light"] body.portal-theme .nav-item {
  background:#f7fafc;color:#30475b;border-color:#d4e2eb;
}
html[data-theme="light"] body.portal-theme .nav-item.active {
  background:#eefaff;color:#102033;
}
html[data-theme="light"] body.portal-theme .messages-thread::before {
  color:rgba(21,100,156,.07);
}
@media(max-width:820px){
  body.portal-theme .messages-thread::before{font-size:clamp(100px,36vw,210px)}
}
