/*
FREEBUFF CANONICAL — FULL VISUAL REDESIGN
Presentation overlay only. v101 app content/functionality stays untouched.
*/

:root,
html.dark{
  --fb0:#02060c;
  --fb1:#040b13;
  --fb2:#07121e;
  --fb3:#0a1928;
  --fb-silver:#edf3f8;
  --fb-steel:#a8bbc9;
  --fb-blue:#8db8e4;
  --fb-blue2:#5d91c3;
  --fb-line:rgba(215,231,242,.105);
  --fb-line2:rgba(225,238,247,.22);
  --fb-glow:rgba(141,184,228,.16);
  --fb-glow2:rgba(188,211,229,.24);
  --fb-serif:Baskerville,"Iowan Old Style","Palatino Linotype",Georgia,serif;

  --radius:.7rem;
  --background:#02060c;
  --foreground:#edf3f8;
  --card:rgba(7,17,28,.66);
  --card-foreground:#edf3f8;
  --popover:rgba(4,12,21,.97);
  --popover-foreground:#edf3f8;
  --primary:#e9f0f5;
  --primary-foreground:#06111b;
  --secondary:rgba(19,39,58,.72);
  --secondary-foreground:#edf3f8;
  --muted:rgba(14,29,44,.62);
  --muted-foreground:#91a7b8;
  --accent:rgba(33,65,92,.55);
  --accent-foreground:#f9fcff;
  --border:rgba(215,231,242,.105);
  --input:rgba(220,234,244,.14);
  --ring:#8db8e4;
  --sidebar:rgba(3,10,18,.90);
  --sidebar-foreground:#eaf1f6;
  --sidebar-primary:rgba(211,228,240,.12);
  --sidebar-primary-foreground:#fff;
  --sidebar-accent:rgba(141,184,228,.08);
  --sidebar-accent-foreground:#fff;
  --sidebar-border:rgba(215,231,242,.10);
  --sidebar-ring:#8db8e4;
}

html{
  background:#02060c;
  color-scheme:dark;
  scrollbar-color:rgba(151,178,198,.24) transparent;
}

body{
  color:var(--foreground);
  background:#02060c;
  -webkit-font-smoothing:antialiased;
  text-rendering:geometricPrecision;
}

::selection{background:rgba(141,184,228,.28);color:#fff}

/* =======================
   APP WORLD / ATMOSPHERE
   ======================= */

body:has(aside){
  min-height:100svh;
  background:
    radial-gradient(ellipse at 76% -12%,rgba(47,86,123,.18),transparent 38%),
    radial-gradient(ellipse at 38% 22%,rgba(16,40,65,.13),transparent 42%),
    linear-gradient(180deg,#02060c 0%,#030913 45%,#02060c 100%);
}

body:has(aside)::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.52;
  background-image:
    radial-gradient(circle at 5% 11%,rgba(141,184,228,.70) 0 1px,transparent 1.45px),
    radial-gradient(circle at 12% 72%,rgba(222,235,245,.38) 0 .75px,transparent 1.3px),
    radial-gradient(circle at 18% 34%,rgba(93,145,195,.50) 0 1px,transparent 1.5px),
    radial-gradient(circle at 27% 91%,rgba(220,233,243,.34) 0 .75px,transparent 1.25px),
    radial-gradient(circle at 36% 18%,rgba(141,184,228,.56) 0 1px,transparent 1.45px),
    radial-gradient(circle at 47% 64%,rgba(237,243,248,.30) 0 .7px,transparent 1.2px),
    radial-gradient(circle at 57% 9%,rgba(93,145,195,.48) 0 1px,transparent 1.45px),
    radial-gradient(circle at 66% 38%,rgba(221,234,243,.38) 0 .8px,transparent 1.3px),
    radial-gradient(circle at 74% 82%,rgba(141,184,228,.54) 0 1px,transparent 1.5px),
    radial-gradient(circle at 82% 24%,rgba(232,241,247,.36) 0 .8px,transparent 1.25px),
    radial-gradient(circle at 91% 57%,rgba(93,145,195,.52) 0 1px,transparent 1.45px),
    radial-gradient(circle at 97% 91%,rgba(231,240,246,.31) 0 .7px,transparent 1.2px);
}

body:has(aside)::after{
  content:"";
  position:fixed;
  inset:-18vh -16vw;
  pointer-events:none;
  z-index:0;
  opacity:.14;
  background:
    radial-gradient(ellipse at 48% 4%,transparent 0 34%,rgba(240,247,252,.74) 34.06% 34.13%,transparent 34.24%),
    radial-gradient(ellipse at 18% 55%,transparent 0 41%,rgba(164,190,209,.52) 41.05% 41.12%,transparent 41.24%),
    radial-gradient(ellipse at 89% 68%,transparent 0 48%,rgba(224,237,246,.48) 48.05% 48.12%,transparent 48.24%);
  filter:drop-shadow(0 0 12px rgba(141,184,228,.18));
}

body:has(aside) #root{
  position:relative;
  z-index:1;
  min-height:100svh;
  isolation:isolate;
}

body:has(aside) #root>div{
  gap:14px;
  padding:14px 14px 14px 0;
  background:transparent!important;
}

/* =======================
   NAVIGATION RAIL
   ======================= */

body:has(aside) aside{
  top:14px!important;
  height:calc(100vh - 28px)!important;
  width:248px!important;
  margin-left:14px;
  overflow:hidden;
  border:1px solid rgba(216,232,243,.115)!important;
  border-radius:26px!important;
  background:
    radial-gradient(ellipse at 32% -8%,rgba(83,125,160,.16),transparent 36%),
    linear-gradient(180deg,rgba(6,16,27,.96),rgba(2,9,16,.91))!important;
  box-shadow:
    0 24px 85px rgba(0,0,0,.31),
    inset 0 1px rgba(255,255,255,.045),
    inset -1px 0 rgba(255,255,255,.018);
  backdrop-filter:blur(28px) saturate(118%);
  -webkit-backdrop-filter:blur(28px) saturate(118%);
}

body:has(aside) aside::before{
  content:"";
  position:absolute;
  left:28px;
  right:28px;
  top:0;
  height:1px;
  z-index:3;
  background:linear-gradient(90deg,transparent,rgba(241,248,252,.72),rgba(141,184,228,.42),transparent);
  box-shadow:0 0 12px rgba(188,211,229,.28);
}

body:has(aside) aside::after{
  content:"";
  position:absolute;
  width:190px;
  height:190px;
  right:-110px;
  top:35%;
  border-radius:50%;
  pointer-events:none;
  background:radial-gradient(circle,rgba(98,150,195,.10),transparent 70%);
  filter:blur(4px);
}

body:has(aside) aside>div:first-child{
  height:66px!important;
  padding:0 19px!important;
  border-bottom:1px solid rgba(216,232,243,.085)!important;
  background:linear-gradient(180deg,rgba(255,255,255,.018),transparent)!important;
}

body:has(aside) aside>div:nth-child(2){
  padding:16px 11px 18px!important;
}

body:has(aside) aside nav{
  gap:18px!important;
}

body:has(aside) aside nav>div>p{
  margin:0 0 6px!important;
  padding:0 11px!important;
  color:rgba(158,182,201,.42)!important;
  font-size:8px!important;
  line-height:1!important;
  letter-spacing:.22em!important;
  font-weight:700!important;
}

body:has(aside) aside nav>div>div{
  gap:2px!important;
}

body:has(aside) aside nav a{
  position:relative;
  min-height:35px;
  padding:8px 11px!important;
  border:1px solid transparent;
  border-radius:12px!important;
  color:rgba(213,227,237,.64)!important;
  font-size:12px!important;
  font-weight:500!important;
  letter-spacing:.005em;
  transition:transform .22s ease,color .22s ease,border-color .22s ease,background .22s ease,box-shadow .22s ease!important;
}

body:has(aside) aside nav a svg{
  opacity:.72;
  filter:drop-shadow(0 0 0 transparent);
  transition:opacity .22s ease,filter .22s ease,transform .22s ease;
}

body:has(aside) aside nav a:hover{
  transform:translateX(3px);
  color:#f8fbff!important;
  border-color:rgba(211,228,240,.07);
  background:linear-gradient(90deg,rgba(141,184,228,.075),rgba(141,184,228,.018))!important;
}

body:has(aside) aside nav a:hover svg{
  opacity:1;
  filter:drop-shadow(0 0 6px rgba(141,184,228,.32));
}

body:has(aside) aside nav a.bg-sidebar-primary{
  color:#fff!important;
  border-color:rgba(222,235,245,.13)!important;
  background:
    linear-gradient(100deg,rgba(226,238,247,.12),rgba(110,157,195,.055) 58%,rgba(64,105,139,.025))!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.045),
    0 10px 28px rgba(0,0,0,.10),
    0 0 24px rgba(141,184,228,.035)!important;
}

body:has(aside) aside nav a.bg-sidebar-primary::before{
  content:"";
  position:absolute;
  left:-1px;
  top:8px;
  bottom:8px;
  width:1px;
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(141,184,228,.62));
  border-radius:999px;
  box-shadow:0 0 9px rgba(188,211,229,.58);
}

body:has(aside) aside nav a.bg-sidebar-primary::after{
  content:"";
  position:absolute;
  right:10px;
  width:3px;
  height:3px;
  border-radius:50%;
  background:#dce8f1;
  box-shadow:0 0 8px rgba(141,184,228,.75);
  opacity:.72;
}

/* =======================
   MAIN INSTRUMENT CANVAS
   ======================= */

body:has(aside) main{
  min-height:calc(100vh - 28px);
  overflow:hidden;
  border:1px solid rgba(216,232,243,.075);
  border-radius:30px;
  background:
    radial-gradient(ellipse at 72% -12%,rgba(63,106,143,.105),transparent 34%),
    linear-gradient(180deg,rgba(4,12,21,.44),rgba(2,8,15,.22))!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.025),
    0 26px 100px rgba(0,0,0,.14);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}

body:has(aside) main::before{
  content:"";
  position:absolute;
  left:46px;
  right:46px;
  top:0;
  height:1px;
  pointer-events:none;
  background:linear-gradient(90deg,transparent,rgba(219,233,243,.19),rgba(141,184,228,.10),transparent);
}

body:has(aside) main>div{
  max-width:1580px!important;
  padding:34px 34px 70px!important;
}

body:has(aside) main>div>div[class*="flex"][class*="flex-col"]{
  gap:26px;
}

/* Hero/page typography */
body:has(aside) main h1{
  color:#f7fbfe;
  font-family:var(--fb-serif);
  font-weight:400!important;
  letter-spacing:-.018em!important;
  line-height:1.02;
  text-shadow:
    0 0 5px rgba(255,255,255,.12),
    0 0 22px rgba(188,211,229,.06);
}

body:has(aside) main h1.text-2xl,
body:has(aside) main h1.text-3xl,
body:has(aside) main header h1{
  font-size:clamp(2rem,3.2vw,3.25rem)!important;
}

body:has(aside) main h2{
  color:#edf4f9;
  letter-spacing:-.01em;
}

body:has(aside) main h2[class*="uppercase"],
body:has(aside) main h3[class*="uppercase"],
body:has(aside) main [class*="uppercase"][class*="tracking-"]{
  color:rgba(195,214,228,.72);
}

body:has(aside) main header{
  position:relative;
}

body:has(aside) main header:has(h1){
  padding-bottom:18px;
  margin-bottom:2px;
}

body:has(aside) main header:has(h1)::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:min(260px,45%);
  height:1px;
  background:linear-gradient(90deg,rgba(235,244,250,.55),rgba(141,184,228,.18),transparent);
  box-shadow:0 0 10px rgba(141,184,228,.10);
}

/* =======================
   CARDS -> INSTRUMENT PLATES
   ======================= */

[data-slot="card"],
body:has(aside) [class~="rounded-xl"][class~="border"][class~="bg-card"],
body:has(aside) [class~="rounded-lg"][class~="border"][class~="bg-card"]{
  position:relative;
  overflow:hidden;
  isolation:isolate;
  border:0!important;
  border-radius:5px 22px 5px 22px!important;
  background:
    linear-gradient(145deg,rgba(13,28,44,.69),rgba(5,14,24,.52) 58%,rgba(3,10,18,.58))!important;
  box-shadow:
    inset 0 1px rgba(237,246,252,.08),
    inset 1px 0 rgba(201,220,235,.035),
    inset 0 -1px rgba(0,0,0,.25),
    0 24px 70px rgba(0,0,0,.13)!important;
  backdrop-filter:blur(18px) saturate(110%);
  -webkit-backdrop-filter:blur(18px) saturate(110%);
}

[data-slot="card"]::before,
body:has(aside) [class~="rounded-xl"][class~="border"][class~="bg-card"]::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(222,235,245,.28),transparent 28%) top left/60% 1px no-repeat,
    linear-gradient(180deg,rgba(222,235,245,.13),transparent 34%) top left/1px 48% no-repeat,
    radial-gradient(circle at 96% 4%,rgba(141,184,228,.105),transparent 24%);
}

[data-slot="card"]::after{
  content:"";
  position:absolute;
  right:-90px;
  bottom:-100px;
  width:230px;
  height:230px;
  z-index:-1;
  pointer-events:none;
  border-radius:50%;
  background:radial-gradient(circle,rgba(82,132,175,.055),transparent 70%);
}

[data-slot="card-header"]{
  padding-bottom:13px!important;
}

[data-slot="card-title"]{
  color:#f3f8fb!important;
  font-weight:600!important;
  letter-spacing:-.012em!important;
}

[data-slot="card-description"]{
  color:rgba(153,178,197,.63)!important;
}

/* Exact common panels */
body:has(aside) [class~="rounded-xl"][class~="border"][class~="border-border"][class~="bg-card"][class~="p-4"],
body:has(aside) [class~="rounded-xl"][class~="border"][class~="border-border"][class~="bg-card"][class~="p-5"],
body:has(aside) [class~="rounded-lg"][class~="border"][class~="border-border"][class~="bg-card"][class~="p-4"],
body:has(aside) [class~="rounded-lg"][class~="border"][class~="border-border"][class~="bg-card"][class~="sm:p-5"]{
  padding:20px!important;
}

/* Mini readings / metric cells: no generic rectangular box */
body:has(aside) .white-edge,
body:has(aside) .white-edge-strong{
  border-color:rgba(221,235,245,.12)!important;
  border-radius:4px 14px 4px 14px!important;
  background:
    linear-gradient(145deg,rgba(18,36,53,.44),rgba(5,14,23,.36))!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.045),
    0 10px 28px rgba(0,0,0,.07)!important;
}

body:has(aside) [class*="border-"][class*="bg-"][class*="shadow-"].white-edge{
  backdrop-filter:blur(10px);
}

/* Empty states become open signal bays */
body:has(aside) [class~="border-dashed"]{
  position:relative;
  border:1px solid rgba(211,228,240,.10)!important;
  border-radius:5px 22px!important;
  background:
    radial-gradient(circle at 50% 50%,rgba(141,184,228,.045),transparent 46%),
    linear-gradient(145deg,rgba(10,22,34,.27),rgba(3,10,18,.18))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.02);
}

/* Separators are chrome rules */
body:has(aside) [class~="border-t"][class~="border-border"]{
  position:relative;
  border-top-color:transparent!important;
}

body:has(aside) [class~="border-t"][class~="border-border"]::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(218,233,243,.19) 15%,rgba(218,233,243,.08) 70%,transparent);
}

body:has(aside) .divide-border>*+*{
  border-color:rgba(213,229,240,.075)!important;
}

/* =======================
   CONTROLS
   ======================= */

body:has(aside) button,
body:has(aside) [role="button"]{
  transition:
    transform .18s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    color .22s ease,
    opacity .22s ease!important;
}

body:has(aside) button:not(:disabled):active,
body:has(aside) [role="button"]:not([aria-disabled="true"]):active{
  transform:translateY(1px) scale(.985);
}

body:has(aside) [data-slot="button"],
body:has(aside) button[class*="rounded-md"][class*="border"]{
  border-radius:11px!important;
}

body:has(aside) [data-slot="button"][class*="bg-primary"],
body:has(aside) button.bg-primary,
body:has(aside) .bg-primary.text-primary-foreground{
  border:1px solid rgba(255,255,255,.52)!important;
  background:linear-gradient(180deg,#f2f7fa 0%,#c8d8e4 100%)!important;
  color:#06111b!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.70),
    0 12px 32px rgba(0,0,0,.18),
    0 0 18px rgba(141,184,228,.055)!important;
}

body:has(aside) button.bg-secondary,
body:has(aside) .bg-secondary{
  border-color:rgba(211,228,240,.11)!important;
  background:linear-gradient(180deg,rgba(30,56,78,.68),rgba(10,27,42,.76))!important;
}

body:has(aside) button[class*="rounded-full"]{
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

body:has(aside) button[class*="border-foreground"][class*="bg-foreground"]{
  background:linear-gradient(180deg,#eef4f8,#bdcfdd)!important;
  color:#07121e!important;
  border-color:rgba(255,255,255,.58)!important;
  box-shadow:0 0 18px rgba(141,184,228,.08),inset 0 1px rgba(255,255,255,.7)!important;
}

body:has(aside) button:hover:not(:disabled){
  box-shadow:
    inset 0 1px rgba(255,255,255,.075),
    0 12px 34px rgba(0,0,0,.13),
    0 0 18px rgba(141,184,228,.045);
}

body:has(aside) input,
body:has(aside) textarea,
body:has(aside) select,
body:has(aside) [data-slot="select-trigger"]{
  border:1px solid rgba(211,228,240,.12)!important;
  border-radius:11px!important;
  background:
    linear-gradient(180deg,rgba(2,8,14,.62),rgba(6,16,26,.58))!important;
  color:#edf3f8!important;
  box-shadow:
    inset 0 1px 5px rgba(0,0,0,.22),
    inset 0 1px rgba(255,255,255,.018)!important;
}

body:has(aside) input:hover,
body:has(aside) textarea:hover,
body:has(aside) select:hover{
  border-color:rgba(211,228,240,.18)!important;
}

body:has(aside) input:focus,
body:has(aside) textarea:focus,
body:has(aside) select:focus,
body:has(aside) [data-slot="select-trigger"]:focus{
  outline:none!important;
  border-color:rgba(141,184,228,.44)!important;
  box-shadow:
    0 0 0 1px rgba(141,184,228,.105),
    0 0 28px rgba(141,184,228,.055),
    inset 0 1px 5px rgba(0,0,0,.20)!important;
}

body:has(aside) input::placeholder,
body:has(aside) textarea::placeholder{
  color:rgba(151,177,197,.43)!important;
}

/* Search becomes optical dark lens */
.search-field,
.dark .search-field{
  min-height:38px!important;
  border:1px solid rgba(221,235,245,.15)!important;
  border-radius:999px!important;
  background:
    radial-gradient(ellipse at 50% 0%,rgba(83,127,163,.11),transparent 58%),
    rgba(2,9,16,.76)!important;
  color:#edf3f8!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.035),
    0 12px 38px rgba(0,0,0,.12),
    0 0 22px rgba(141,184,228,.035)!important;
}

.search-field::placeholder,
.dark .search-field::placeholder{
  color:rgba(167,191,209,.43)!important;
}

.search-field:focus,
.dark .search-field:focus{
  border-color:rgba(141,184,228,.46)!important;
  box-shadow:
    0 0 0 1px rgba(141,184,228,.09),
    0 0 32px rgba(141,184,228,.08),
    inset 0 1px rgba(255,255,255,.045)!important;
}

/* =======================
   TABS / FILTERS / BADGES
   ======================= */

[data-slot="tabs-list"]{
  padding:4px!important;
  border:1px solid rgba(213,229,240,.10)!important;
  border-radius:14px!important;
  background:rgba(3,10,18,.47)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.018)!important;
}

[data-slot="tabs-trigger"]{
  border-radius:10px!important;
  color:rgba(188,207,221,.58)!important;
}

[data-slot="tabs-trigger"][data-state="active"]{
  background:
    linear-gradient(180deg,rgba(219,233,243,.14),rgba(97,143,180,.065))!important;
  color:#fff!important;
  box-shadow:inset 0 1px rgba(255,255,255,.065),0 8px 20px rgba(0,0,0,.10)!important;
}

[data-slot="badge"],
body:has(aside) [class*="rounded-full"][class*="border"]{
  border-color:rgba(216,232,243,.12)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.022);
}

/* =======================
   TABLES / DATA LISTS
   ======================= */

body:has(aside) table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}

body:has(aside) thead{
  background:linear-gradient(180deg,rgba(16,34,51,.36),rgba(4,13,22,.08));
  color:rgba(189,209,223,.60);
}

body:has(aside) th{
  padding-top:10px!important;
  padding-bottom:10px!important;
  border-color:rgba(211,228,240,.075)!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.08em;
}

body:has(aside) td{
  border-color:rgba(211,228,240,.065)!important;
}

body:has(aside) tbody tr{
  transition:background .18s ease,box-shadow .18s ease;
}

body:has(aside) tbody tr:hover{
  background:linear-gradient(90deg,rgba(141,184,228,.035),rgba(141,184,228,.012));
}

body:has(aside) [class~="divide-y"][class~="divide-border"][class~="overflow-hidden"][class~="rounded-lg"][class~="border"]{
  overflow:hidden;
  border:1px solid rgba(211,228,240,.085)!important;
  border-radius:4px 18px!important;
  background:rgba(4,12,21,.25);
}

/* =======================
   MODALS / SHEETS / MENUS
   ======================= */

[data-slot="dialog-overlay"],
[data-slot="alert-dialog-overlay"]{
  background:rgba(0,3,8,.77)!important;
  backdrop-filter:blur(11px) saturate(90%);
  -webkit-backdrop-filter:blur(11px) saturate(90%);
}

[data-slot="dialog-content"],
[data-slot="alert-dialog-content"],
[data-slot="popover-content"],
[data-slot="dropdown-menu-content"],
[data-slot="select-content"],
[role="dialog"]{
  border:1px solid rgba(221,235,245,.14)!important;
  border-radius:7px 26px 7px 26px!important;
  background:
    radial-gradient(ellipse at 68% -8%,rgba(72,116,153,.13),transparent 34%),
    linear-gradient(160deg,rgba(8,20,33,.985),rgba(3,10,18,.99))!important;
  box-shadow:
    0 38px 130px rgba(0,0,0,.62),
    inset 0 1px rgba(255,255,255,.045)!important;
  backdrop-filter:blur(30px) saturate(112%);
  -webkit-backdrop-filter:blur(30px) saturate(112%);
}

[data-slot="dialog-content"]::before,
[data-slot="alert-dialog-content"]::before{
  content:"";
  position:absolute;
  left:34px;
  right:34px;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(242,248,252,.63),rgba(141,184,228,.25),transparent);
  box-shadow:0 0 12px rgba(188,211,229,.16);
}

[data-slot="sheet-content"]{
  border-color:rgba(218,233,243,.12)!important;
  background:
    radial-gradient(ellipse at 15% -4%,rgba(61,104,140,.14),transparent 35%),
    linear-gradient(180deg,rgba(5,15,25,.985),rgba(2,9,16,.99))!important;
  box-shadow:28px 0 100px rgba(0,0,0,.54)!important;
}

/* Scanner/camera surfaces */
[role="dialog"] video,
[data-slot="dialog-content"] video,
[role="dialog"] canvas,
[data-slot="dialog-content"] canvas{
  border:1px solid rgba(221,235,245,.17)!important;
  border-radius:6px 24px 6px 24px!important;
  background:#010409!important;
  box-shadow:
    inset 0 0 40px rgba(0,0,0,.52),
    0 22px 70px rgba(0,0,0,.26),
    0 0 28px rgba(141,184,228,.045)!important;
}

/* =======================
   CHAT / ASSISTANT
   ======================= */

body:has(aside) [class~="overflow-hidden"][class~="rounded-lg"][class~="border"][class*="bg-card"]{
  border:1px solid rgba(216,232,243,.09)!important;
  border-radius:5px 24px 5px 24px!important;
  background:
    radial-gradient(ellipse at 85% 0%,rgba(70,113,149,.08),transparent 32%),
    rgba(4,12,21,.42)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025),0 22px 70px rgba(0,0,0,.10)!important;
}

body:has(aside) [class*="max-w-[85%]"][class*="rounded-xl"][class*="border"]{
  border:1px solid rgba(216,232,243,.095)!important;
  border-radius:4px 18px 18px 18px!important;
  background:linear-gradient(145deg,rgba(13,28,43,.58),rgba(5,14,23,.46))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.025),0 10px 32px rgba(0,0,0,.08);
}

/* =======================
   CHARTS
   ======================= */

body:has(aside) .recharts-cartesian-grid line{
  stroke:rgba(202,221,235,.065)!important;
}

body:has(aside) .recharts-text{
  fill:rgba(177,199,215,.58)!important;
}

body:has(aside) .recharts-tooltip-wrapper>div{
  border:1px solid rgba(216,232,243,.12)!important;
  border-radius:4px 15px!important;
  background:rgba(3,11,19,.965)!important;
  color:#edf3f8!important;
  box-shadow:0 20px 58px rgba(0,0,0,.43),inset 0 1px rgba(255,255,255,.03)!important;
  backdrop-filter:blur(20px);
}

/* =======================
   SEMANTIC COLORS / READINGS
   ======================= */

body:has(aside) [class*="bg-energy/"],
body:has(aside) [class*="bg-carbs/"],
body:has(aside) [class*="bg-fibre/"],
body:has(aside) [class*="bg-macros/"],
body:has(aside) [class*="bg-vitamins/"],
body:has(aside) [class*="bg-minerals/"],
body:has(aside) [class*="bg-amino/"],
body:has(aside) [class*="bg-fatty/"],
body:has(aside) [class*="bg-hydration/"],
body:has(aside) [class*="bg-success/"]{
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

body:has(aside) .font-mono[class*="text-3xl"],
body:has(aside) .font-mono[class*="text-2xl"],
body:has(aside) .font-mono[class*="text-lg"]{
  text-shadow:0 0 14px rgba(188,211,229,.045);
}

/* =======================
   TOASTS
   ======================= */

[data-sonner-toaster] [data-sonner-toast]{
  border:1px solid rgba(216,232,243,.13)!important;
  border-radius:4px 16px!important;
  background:linear-gradient(155deg,rgba(10,24,38,.965),rgba(3,11,19,.975))!important;
  color:#edf3f8!important;
  box-shadow:0 20px 70px rgba(0,0,0,.45),inset 0 1px rgba(255,255,255,.035)!important;
  backdrop-filter:blur(22px);
}

/* =======================
   ACCOUNT / AUTH SURFACES
   ======================= */

html.uacct-gated body{
  background:
    radial-gradient(ellipse at 50% 18%,rgba(13,30,51,.62) 0%,rgba(5,12,22,.3) 42%,rgba(2,5,10,0) 74%),
    #02060c!important;
  color:#edf3f8!important;
}

#uacct-full-gate{
  background:
    radial-gradient(circle at 50% 12%,rgba(141,184,228,.10),transparent 29%),
    radial-gradient(circle at 8% 17%,rgba(93,145,195,.55) 0 1px,transparent 1.5px),
    radial-gradient(circle at 17% 74%,rgba(225,237,246,.35) 0 .8px,transparent 1.3px),
    radial-gradient(circle at 82% 19%,rgba(222,235,244,.48) 0 1px,transparent 1.45px),
    radial-gradient(circle at 91% 72%,rgba(93,145,195,.44) 0 1px,transparent 1.45px),
    radial-gradient(circle at 64% 87%,rgba(221,234,243,.31) 0 .75px,transparent 1.25px),
    #02060c!important;
  font-family:"Space Grotesk",ui-sans-serif,system-ui,sans-serif!important;
}

#uacct-gate-card{
  position:relative;
  width:min(410px,calc(100vw - 30px))!important;
  padding:31px 30px 28px!important;
  overflow:hidden;
  border:0!important;
  border-radius:5px 28px 5px 28px!important;
  background:
    radial-gradient(ellipse at 80% -10%,rgba(80,126,164,.15),transparent 37%),
    linear-gradient(150deg,rgba(11,25,40,.88),rgba(3,11,19,.92))!important;
  color:#edf3f8!important;
  box-shadow:
    inset 0 1px rgba(242,248,252,.10),
    inset 1px 0 rgba(218,233,243,.035),
    0 40px 120px rgba(0,0,0,.54),
    0 0 90px rgba(141,184,228,.035)!important;
  backdrop-filter:blur(30px) saturate(112%)!important;
  -webkit-backdrop-filter:blur(30px) saturate(112%)!important;
}

#uacct-gate-card::before{
  content:"";
  position:absolute;
  left:32px;
  right:32px;
  top:0;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(245,250,253,.78),rgba(141,184,228,.30),transparent);
  box-shadow:0 0 13px rgba(188,211,229,.22);
}

#uacct-gate-card::after{
  content:"";
  position:absolute;
  width:240px;
  height:240px;
  right:-150px;
  bottom:-150px;
  pointer-events:none;
  border-radius:50%;
  background:radial-gradient(circle,rgba(100,151,194,.10),transparent 70%);
}

#uacct-gate-card h1{
  margin:0 0 22px!important;
  font-family:var(--fb-serif)!important;
  font-size:38px!important;
  line-height:1!important;
  font-weight:400!important;
  letter-spacing:-.035em!important;
  color:#f9fcff!important;
  text-shadow:0 0 5px rgba(255,255,255,.23),0 0 24px rgba(188,211,229,.10)!important;
}

#uacct-gate-card input{
  height:47px!important;
  padding:11px 13px!important;
  border:1px solid rgba(211,228,240,.13)!important;
  border-radius:11px!important;
  background:rgba(1,7,13,.58)!important;
  color:#f7fbfd!important;
  outline:none!important;
  box-shadow:inset 0 1px 6px rgba(0,0,0,.24)!important;
}

#uacct-gate-card input:focus{
  border-color:rgba(141,184,228,.48)!important;
  box-shadow:0 0 0 1px rgba(141,184,228,.10),0 0 28px rgba(141,184,228,.06),inset 0 1px 6px rgba(0,0,0,.22)!important;
}

#uacct-gate-card button{
  height:43px!important;
  border:1px solid rgba(255,255,255,.53)!important;
  border-radius:11px!important;
  background:linear-gradient(180deg,#f2f7fa,#c6d7e3)!important;
  color:#06111b!important;
  font-weight:700!important;
  box-shadow:inset 0 1px rgba(255,255,255,.72),0 12px 34px rgba(0,0,0,.18)!important;
}

#uacct-gate-card button.alt{
  background:linear-gradient(180deg,rgba(31,57,78,.72),rgba(10,27,42,.78))!important;
  color:#edf4f9!important;
  border-color:rgba(213,229,240,.12)!important;
}

#uacct-gate-status{
  color:rgba(155,180,199,.62)!important;
}

#uacct-badge{
  border:1px solid rgba(218,233,243,.13)!important;
  border-radius:12px 12px 4px 12px!important;
  background:rgba(3,11,19,.82)!important;
  color:#edf3f8!important;
  box-shadow:0 12px 36px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.035)!important;
  backdrop-filter:blur(20px)!important;
}

#uacct-badge b{
  color:#dce8f1!important;
  text-shadow:0 0 10px rgba(141,184,228,.24);
}

#uacct-mini{
  background:rgba(0,3,8,.75)!important;
  backdrop-filter:blur(13px)!important;
}

#uacct-mini-card{
  border:0!important;
  border-radius:5px 22px 5px 22px!important;
  background:linear-gradient(155deg,rgba(10,24,38,.98),rgba(3,11,19,.985))!important;
  color:#edf3f8!important;
  box-shadow:inset 0 1px rgba(255,255,255,.045),0 34px 100px rgba(0,0,0,.56)!important;
}

#uacct-mini-card button{
  border-color:rgba(211,228,240,.12)!important;
  background:linear-gradient(180deg,rgba(30,55,75,.76),rgba(10,27,42,.82))!important;
  color:#edf3f8!important;
}

/* React auth card (not the GODMORGEN landing) */
body:not(:has(aside)) [data-slot="card"]{
  border-radius:5px 28px 5px 28px!important;
  background:
    radial-gradient(ellipse at 80% -10%,rgba(80,126,164,.14),transparent 36%),
    linear-gradient(150deg,rgba(11,25,40,.90),rgba(3,11,19,.94))!important;
}

/* =======================
   MOBILE = FLOATING TOP POD
   ======================= */

body:has(aside) .fixed.inset-x-0.top-0{
  top:10px!important;
  left:10px!important;
  right:10px!important;
  height:50px!important;
  border:1px solid rgba(216,232,243,.11)!important;
  border-radius:16px!important;
  background:rgba(3,11,19,.82)!important;
  box-shadow:0 16px 48px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.035)!important;
  backdrop-filter:blur(26px) saturate(115%)!important;
  -webkit-backdrop-filter:blur(26px) saturate(115%)!important;
}

@media(max-width:767px){
  body:has(aside) #root>div{
    padding:0!important;
    gap:0!important;
  }

  body:has(aside) main{
    min-height:100svh;
    border:0;
    border-radius:0;
    background:
      radial-gradient(ellipse at 72% 0%,rgba(63,106,143,.09),transparent 30%),
      rgba(2,7,13,.35)!important;
    box-shadow:none;
  }

  body:has(aside) main>div{
    padding:78px 15px 52px!important;
  }

  body:has(aside) main h1.text-2xl,
  body:has(aside) main h1.text-3xl,
  body:has(aside) main header h1{
    font-size:2.25rem!important;
  }

  [data-slot="card"],
  body:has(aside) [class~="rounded-xl"][class~="border"][class~="bg-card"]{
    border-radius:4px 18px 4px 18px!important;
  }

  #uacct-gate-card{
    padding:26px 22px 24px!important;
  }

  #uacct-badge{
    top:auto!important;
    right:12px!important;
    bottom:12px!important;
  }
}

/* =======================
   DESKTOP SCALE / SPACING
   ======================= */

@media(min-width:1280px){
  body:has(aside) main>div{
    padding-left:42px!important;
    padding-right:42px!important;
  }

  body:has(aside) [class~="grid"][class~="gap-3"]{
    gap:14px!important;
  }
}

/* =======================
   DESKTOP CLICK SAFETY
   ======================= */

/* Pure visual chrome must never become the pointer hit target. */
body:has(aside) aside::before,
body:has(aside) aside nav a.bg-sidebar-primary::before,
body:has(aside) aside nav a.bg-sidebar-primary::after,
body:has(aside) main header:has(h1)::after,
body:has(aside) [class~="border-t"][class~="border-border"]::before,
[data-slot="dialog-content"]::before,
[data-slot="alert-dialog-content"]::before,
#uacct-gate-card::before{
  pointer-events:none!important;
}

/* Desktop Radix safety: an orphan viewport backdrop can remain data-state="open"
   even after its content has disappeared. If there is no matching open content in
   the document, the backdrop is visual garbage and must never own mouse input. */
body:not(:has([data-slot="dialog-content"][data-state="open"])) [data-slot="dialog-overlay"],
body:not(:has([role="dialog"][data-state="open"])) [data-slot="dialog-overlay"],
body:not(:has([data-slot="alert-dialog-content"][data-state="open"])) [data-slot="alert-dialog-overlay"],
body:not(:has([role="alertdialog"][data-state="open"])) [data-slot="alert-dialog-overlay"],
body:not(:has([data-slot="sheet-content"][data-state="open"])) [data-slot="sheet-overlay"],
[data-slot="dialog-overlay"][data-state="closed"],
[data-slot="alert-dialog-overlay"][data-state="closed"],
[data-slot="sheet-overlay"][data-state="closed"]{
  pointer-events:none!important;
}

@media (min-width:768px){
  html:not(.uacct-gated),
  html:not(.uacct-gated) body,
  html:not(.uacct-gated) #root{
    pointer-events:auto!important;
  }
  body:has(aside) #root,
  body:has(aside) aside,
  body:has(aside) main{
    pointer-events:auto!important;
  }
}

/* Camera scanner is deliberately non-modal. A browser's stale Radix
   pointer lock must never turn the entire /log view unclickable. */
html:has([data-freebuff-camera-dialog]) body,
html:has([data-freebuff-camera-dialog]) #root{
  pointer-events:auto!important;
}
[data-freebuff-camera-dialog]{
  pointer-events:auto!important;
  z-index:2147483000!important;
}
[data-freebuff-camera-dialog] button{
  pointer-events:auto!important;
}

/* =======================
   SCROLLBARS / FOCUS / MOTION
   ======================= */

body:has(aside) *::-webkit-scrollbar{width:9px;height:9px}
body:has(aside) *::-webkit-scrollbar-track{background:transparent}
body:has(aside) *::-webkit-scrollbar-thumb{
  border:3px solid transparent;
  border-radius:999px;
  background:rgba(158,185,205,.19);
  background-clip:padding-box;
}
body:has(aside) *::-webkit-scrollbar-thumb:hover{
  border:3px solid transparent;
  background:rgba(178,204,221,.34);
  background-clip:padding-box;
}

body:has(aside) :focus-visible{
  outline-color:rgba(141,184,228,.62)!important;
  outline-offset:2px;
}

@keyframes fb-rise{
  from{opacity:0;transform:translateY(7px);filter:blur(2px)}
  to{opacity:1;transform:translateY(0);filter:blur(0)}
}

@keyframes fb-active-line{
  0%,100%{opacity:.52;box-shadow:0 0 7px rgba(188,211,229,.30)}
  50%{opacity:1;box-shadow:0 0 15px rgba(188,211,229,.68)}
}

@media(prefers-reduced-motion:no-preference){
  body:has(aside) main>div>*{
    animation:fb-rise .52s cubic-bezier(.22,1,.36,1) both;
  }
  body:has(aside) aside nav a.bg-sidebar-primary::before{
    animation:fb-active-line 3.6s ease-in-out infinite;
  }
}

@media(prefers-reduced-motion:reduce){
  body:has(aside) *,
  body:has(aside) *::before,
  body:has(aside) *::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* HealthByAI Log · editorial compact system · 2026-11-03 */
.hba-log-screen{
 --hba-ink:#e9f2f9;--hba-secondary:#a4b9ca;--hba-line:rgba(133,166,194,.18);
 --hba-blue:#76c2f6;--hba-teal:#79d6ba;--hba-amber:#f3c583;--hba-mauve:#aeb6ef;
 font-family:"Manrope","Segoe UI Variable","Segoe UI",system-ui,sans-serif!important;
 width:100%;min-width:0;max-width:100%;gap:14px!important;color:var(--hba-ink);
}
.hba-log-screen :is(button,input,textarea,select,h1,h2,h3,h4,h5,p,span,li,label,strong,small){
 font-family:"Manrope","Segoe UI Variable","Segoe UI",system-ui,sans-serif!important;
 font-synthesis:none;-webkit-font-smoothing:antialiased;
}
.hba-log-screen button{touch-action:manipulation;transition:background-color .14s ease,border-color .14s ease,color .14s ease,transform .14s ease!important;}
.hba-log-screen button:active:not(:disabled){transform:scale(.985)}
.hba-log-screen :is(input,button):focus-visible{outline:2px solid #87ccf9!important;outline-offset:2px}
.hba-page-header{
 width:100%;max-width:1100px;margin:0 auto;
 display:flex!important;align-items:center!important;justify-content:space-between!important;
 gap:16px;padding:4px 2px 2px!important;min-height:58px;
}
.hba-page-ident{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-width:0}
.hba-page-overline{font-size:9px!important;letter-spacing:.16em!important;color:#8da8bd!important;font-weight:750!important;line-height:1.2}
.hba-page-title{
 margin:0!important;font-size:clamp(19px,2vw,24px)!important;line-height:1.14!important;
 font-weight:780!important;letter-spacing:-.055em!important;text-align:left!important;
 text-transform:none!important;color:#f1f6fb!important;text-shadow:none!important;
}
.hba-scan-main{
 height:40px!important;min-height:40px!important;padding:0 17px!important;gap:9px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 flex-shrink:0!important;white-space:nowrap!important;
 border:1px solid rgba(244,197,123,.43)!important;border-radius:11px!important;
 background:linear-gradient(120deg,rgba(151,107,47,.25),rgba(133,90,38,.14))!important;
 color:#ffe2b2!important;box-shadow:0 0 0 1px rgba(255,218,166,.025) inset!important;
 font-size:12px!important;font-weight:760!important;letter-spacing:-.01em!important;
}
.hba-scan-main:hover{background:rgba(151,107,47,.33)!important;border-color:rgba(247,197,118,.65)!important;color:#ffe9c9!important}
.hba-scan-glyph{width:19px!important;height:19px!important;stroke-width:1.85!important;color:#ffcf8c!important}
.hba-log-main{width:100%;max-width:1100px;margin:0 auto;display:flex;flex-direction:column;gap:10px!important;min-width:0}
.hba-intake-panel{
 padding:13px 15px 14px!important;border-radius:14px!important;
 border:1px solid rgba(128,178,204,.20)!important;
 background:linear-gradient(130deg,rgba(11,29,45,.89),rgba(5,17,30,.89))!important;
 box-shadow:none!important;
 min-width:0!important;
}
.hba-intake-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:13px!important;flex-wrap:wrap}
.hba-intake-label{display:inline-flex!important;align-items:center!important;gap:8px!important;flex-shrink:0}
.hba-intake-label>svg{height:17px!important;width:17px!important;color:var(--hba-teal)!important;stroke-width:2.2}
.hba-intake-title{
 margin:0!important;font-size:14px!important;line-height:1.3!important;
 color:#edf6fd!important;font-weight:755!important;letter-spacing:-.025em!important;text-transform:none!important;
}
.hba-water-inline{
 display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-end!important;
 gap:7px!important;margin:0!important;padding:3px 3px 3px 9px!important;
 width:auto!important;min-width:0!important;min-height:36px!important;
 border:1px solid rgba(96,170,225,.19)!important;border-radius:10px!important;
 background:rgba(39,83,115,.13)!important;
 box-shadow:none!important;
}
.hba-water-inline>div:first-child{
 display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
 gap:6px!important;flex:none!important;margin:0!important
}
.hba-water-inline .hba-water-icon{width:15px!important;height:15px!important;color:#75c8fc!important}
.hba-water-inline .hba-water-text{
 font-size:11px!important;font-weight:735!important;line-height:1!important;letter-spacing:-.015em!important;
 color:#b4ddf8!important;text-transform:none!important;margin:0!important;
}
.hba-water-inline>div:nth-child(2){
 display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;
 gap:4px!important;margin:0!important;
}
.hba-water-inline .hba-water-input{
 width:67px!important;max-width:67px!important;height:27px!important;min-height:27px!important;
 padding:3px 4px!important;border-radius:6px!important;
 border:1px solid rgba(110,185,230,.22)!important;background:rgba(5,21,36,.68)!important;
 color:#e4f5ff!important;font-size:11px!important;font-weight:740!important;
 text-align:center!important;line-height:1!important;font-variant-numeric:tabular-nums!important;box-shadow:none!important;
}
.hba-water-inline>div:nth-child(2)>span{font-size:10px!important;color:#84badd!important;font-weight:740!important;line-height:1!important}
.hba-water-inline .hba-water-submit{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;
 height:27px!important;min-height:27px!important;width:27px!important;min-width:27px!important;
 margin:0 0 0 1px!important;padding:4px!important;border-radius:7px!important;
 background:rgba(54,130,180,.32)!important;color:#b4e3ff!important;
 border:1px solid rgba(115,184,230,.20)!important;box-shadow:none!important;
}
.hba-water-inline .hba-water-submit:hover{background:rgba(69,154,210,.48)!important}
.hba-water-inline .hba-water-submit svg{width:13px!important;height:13px!important}
.hba-search-row{display:flex!important;align-items:center!important;gap:9px!important;margin-top:12px!important}
.hba-search-row>div{flex:1;min-width:0}
.hba-search-row>div>svg{position:absolute!important;left:13px!important;top:50%!important;transform:translateY(-50%);height:17px!important;width:17px!important;color:#86acc6!important;pointer-events:none}
.hba-food-search{
 width:100%!important;min-height:41px!important;height:41px!important;
 padding:7px 13px 7px 40px!important;border-radius:10px!important;
 background:rgba(7,20,34,.72)!important;border:1px solid rgba(123,167,196,.24)!important;
 box-shadow:none!important;outline:none;color:#e7f3fc!important;
 font-size:13px!important;font-weight:540!important;
}
.hba-food-search:focus{border-color:rgba(114,195,244,.58)!important;box-shadow:0 0 0 3px rgba(77,156,211,.09)!important}
.hba-intake-panel .hba-search-row+div{margin-top:8px!important}
.hba-intake-panel .hba-search-row+div button{border-radius:7px!important}
.hba-saved-panel{
 border-radius:14px!important;border:1px solid rgba(132,169,195,.2)!important;
 background:linear-gradient(130deg,rgba(10,26,41,.90),rgba(5,16,29,.89))!important;
 box-shadow:none!important;
 padding:12px 14px!important;min-height:0!important;margin:0!important;
}
.hba-meals-head{
 display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
 padding:0!important;margin:0!important;height:auto!important;min-height:34px!important;
}
.hba-meals-caption{display:inline-flex!important;align-items:center!important;gap:9px!important;min-width:0}
.hba-meals-icon{width:17px!important;height:17px!important;color:var(--hba-mauve)!important;stroke-width:1.8!important}
.hba-meals-title{
 margin:0!important;font-size:14px!important;font-weight:755!important;letter-spacing:-.027em!important;
 text-transform:none!important;line-height:1.25!important;color:#e6edf8!important
}
.hba-new-meal{
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
 padding:5px 11px!important;height:32px!important;min-height:32px!important;
 font-size:11px!important;font-weight:750!important;letter-spacing:0!important;
 line-height:1!important;border-radius:9px!important;
 color:#bfeedd!important;border:1px solid rgba(102,199,169,.31)!important;
 background:linear-gradient(115deg,rgba(34,105,87,.25),rgba(20,70,71,.20))!important;
 box-shadow:none!important;white-space:nowrap!important;
}
.hba-new-meal:hover{color:#e4fff3!important;border-color:rgba(105,212,174,.5)!important;background:rgba(44,126,103,.34)!important}
.hba-new-meal svg{width:15px!important;height:15px!important;color:#82dbba!important;stroke-width:2.2!important}
.hba-saved-panel>ul.hba-meal-grid{
 display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
 gap:7px!important;max-height:345px!important;
 padding:1px 2px 2px 0!important;margin:8px 0 0!important;overflow-y:auto!important;
 scrollbar-width:thin!important;scrollbar-color:rgba(133,167,189,.28) transparent!important;
}
.hba-meal-tile{
 padding:10px 11px 8px!important;min-height:95px!important;min-width:0!important;
 border-radius:10px!important;
 border:1px solid rgba(132,172,199,.16)!important;border-left:2px solid color-mix(in srgb,var(--hba-meal-color) 65%,#7b9bb3)!important;
 background:linear-gradient(133deg,rgba(23,45,64,.65),rgba(11,28,44,.75))!important;
 box-shadow:none!important;gap:6px!important;
}
.hba-meal-tile:hover{background:linear-gradient(133deg,rgba(26,49,69,.81),rgba(11,30,47,.83))!important;border-color:rgba(131,183,217,.3)!important}
.hba-meal-tile .hba-tile-name{font-size:12px!important;letter-spacing:-.025em!important;font-weight:750!important;color:#edf4fa!important}
.hba-meal-tile .hba-tile-icon{color:#b0c5d5!important}
.hba-meal-tile .hba-tile-icon svg{stroke-width:1.9!important}
.hba-meal-tile .hba-tile-delete{color:#d88894!important}
.hba-meal-tile .hba-tile-ingredients{gap:4px!important;height:auto!important;min-height:19px!important}
.hba-meal-tile .hba-mini-ingredient{
 padding:3px 6px!important;
 background:rgba(52,83,106,.24)!important;border:1px solid rgba(121,165,196,.11)!important;
 border-radius:6px!important;color:#bdd0dd!important;
}
.hba-meal-tile .hba-mini-percent{color:#91d3f5!important}
.hba-meal-tile .hba-tile-kcal{font-size:10px!important;color:#b2c4d0!important}
.hba-meal-tile .hba-tile-kcal svg{color:#f5bc75!important}
.hba-meal-tile .hba-tile-add{
 padding:4px 10px!important;min-width:62px!important;min-height:26px!important;height:26px!important;
 border-radius:7px!important;font-size:10px!important;font-weight:730!important;
 color:#b8e8dc!important;
 background:rgba(45,105,91,.24)!important;border:1px solid rgba(113,193,165,.25)!important;
}
.hba-meal-tile .hba-tile-add svg{color:#79d5b6!important}
.hba-meal-tile .hba-tile-add:hover{background:rgba(54,126,107,.36)!important;border-color:rgba(118,207,177,.45)!important}
.hba-meal-tile .hba-tile-footer{margin-top:auto!important}
.hba-log-screen :is(.hba-intake-panel,.hba-saved-panel,.hba-water-inline,.hba-meal-tile){backdrop-filter:none!important;filter:none!important;}
@media (max-width:1000px){.hba-saved-panel>ul.hba-meal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:650px){
 .hba-page-header{min-height:52px!important;padding:4px 0!important}
 .hba-page-title{font-size:20px!important}
 .hba-scan-main{height:37px!important;min-height:37px!important;padding:0 12px!important}
 .hba-intake-panel{padding:11px!important}
 .hba-intake-header{gap:8px!important}
 .hba-water-inline{padding:3px 4px 3px 7px!important;gap:4px!important}
 .hba-water-inline .hba-water-input{width:56px!important;max-width:56px!important}
 .hba-water-inline .hba-water-text{font-size:10px!important}
 .hba-saved-panel{padding:11px!important}
 .hba-saved-panel>ul.hba-meal-grid{grid-template-columns:1fr!important}
 .hba-new-meal{height:31px!important;min-height:31px!important}
}
@media (max-width:370px){.hba-intake-header{align-items:flex-start!important}.hba-water-inline{width:100%!important;justify-content:flex-start!important}}
@media(prefers-reduced-motion:reduce){.hba-log-screen button{transition:none!important}}


/* Quality refinement: genuinely dense adaptive meal list, readable chips and actions */
body .hba-log-screen .hba-saved-panel{
 padding:11px 13px 12px!important;
}
body .hba-log-screen .hba-saved-panel>ul.hba-meal-grid{
 display:grid!important;
 grid-template-columns:repeat(auto-fit,minmax(min(100%,224px),1fr))!important;
 grid-auto-flow:row!important;
 grid-auto-rows:min-content!important;
 align-content:start!important;
 align-items:stretch!important;
 gap:7px!important;
 max-height:310px!important;
 overflow:auto!important;
 margin:9px 0 0!important;
 padding:1px 3px 2px 0!important;
 list-style:none!important;
}
body .hba-log-screen .hba-saved-panel .hba-meal-tile{
 display:grid!important;
 grid-template-rows:20px auto 24px!important;
 align-content:stretch!important;
 align-items:stretch!important;
 gap:4px!important;
 min-width:0!important;
 min-height:88px!important;
 height:auto!important;
 margin:0!important;
 padding:7px 9px 7px!important;
 border-radius:10px!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-top{
 display:flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:space-between!important;
 width:100%!important;
 min-width:0!important;
 height:20px!important;
 gap:7px!important;
 margin:0!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-name{
 flex:1 1 auto!important;
 min-width:0!important;
 display:block!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 white-space:nowrap!important;
 font-size:12px!important;
 line-height:20px!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-actions{
 flex:0 0 auto!important;
 display:inline-flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:flex-end!important;
 width:auto!important;
 height:22px!important;
 gap:1px!important;
 margin:0!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-icon{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 flex:0 0 22px!important;
 width:22px!important;height:22px!important;
 padding:4px!important;
 min-width:22px!important;min-height:22px!important;
 color:#9fc7df!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-delete{color:#e698a0!important}
body .hba-log-screen .hba-meal-tile .hba-tile-ingredients{
 display:flex!important;
 flex-direction:row!important;
 flex-wrap:wrap!important;
 width:100%!important;
 max-width:100%!important;
 min-width:0!important;
 min-height:19px!important;
 height:auto!important;
 align-items:flex-start!important;
 align-content:start!important;
 justify-content:flex-start!important;
 overflow:hidden!important;
 gap:4px!important;
 margin:0!important;
}
body .hba-log-screen .hba-meal-tile .hba-mini-ingredient{
 display:inline-flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:flex-start!important;
 flex:0 1 auto!important;
 max-width:calc(50% - 2px)!important;
 min-width:0!important;
 width:auto!important;
 padding:3px 6px!important;
 margin:0!important;
 gap:5px!important;
 white-space:nowrap!important;
 font-size:10px!important;
 line-height:1.2!important;
}
body .hba-log-screen .hba-meal-tile .hba-mini-name{
 display:block!important;
 flex:1 1 auto!important;
 min-width:0!important;
 width:auto!important;
 max-width:none!important;
 margin:0!important;
 white-space:nowrap!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
 line-height:1.2!important;
 color:#c7d8e3!important;
}
body .hba-log-screen .hba-meal-tile .hba-mini-percent{
 display:block!important;
 flex:0 0 auto!important;
 min-width:max-content!important;
 padding-left:5px!important;
 border-left:1px solid rgba(121,165,196,.22)!important;
 color:#92d2f5!important;
 font-weight:730!important;
 font-size:10px!important;
 line-height:1.2!important;
}
body .hba-log-screen .hba-meal-tile .hba-mini-diy{
 flex:none!important;
 margin:0!important;
 color:#efb778!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-footer{
 display:flex!important;
 flex-direction:row!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:7px!important;
 margin:0!important;
 width:100%!important;
 min-width:0!important;
 min-height:24px!important;
 height:24px!important;
}
body .hba-log-screen .hba-meal-tile .hba-footer-info{
 display:inline-flex!important;
 align-items:center!important;
 justify-content:flex-start!important;
 gap:5px!important;
 flex:1 1 auto!important;
 min-width:0!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-kcal{
 display:inline-flex!important;
 align-items:center!important;
 gap:4px!important;
 font-size:10px!important;
 white-space:nowrap!important;
 flex:0 1 auto!important;
 min-width:0!important;
 overflow:hidden!important;
 text-overflow:ellipsis!important;
}
body .hba-log-screen .hba-meal-tile .hba-ingredients-expand{
 height:20px!important;
 min-height:20px!important;
 width:auto!important;
 min-width:23px!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 margin:0!important;
 padding:2px 5px!important;
 border:1px solid rgba(118,170,206,.25)!important;
 border-radius:5px!important;
 background:rgba(70,112,144,.2)!important;
 color:#acd2e9!important;
 font-size:10px!important;
 font-weight:760!important;
 line-height:1!important;
 white-space:nowrap!important;
}
body .hba-log-screen .hba-meal-tile .hba-ingredients-expand:hover{
 background:rgba(70,132,178,.34)!important;
}
body .hba-log-screen .hba-meal-tile .hba-tile-add{
 flex:0 0 auto!important;
 display:inline-flex!important;
 align-items:center!important;
 justify-content:center!important;
 gap:5px!important;
 min-width:60px!important;
 height:24px!important;
 min-height:24px!important;
 padding:4px 9px!important;
 border-radius:7px!important;
 margin:0!important;
}
@media(max-width:1000px){
 body .hba-log-screen .hba-saved-panel>ul.hba-meal-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,224px),1fr))!important;
 }
}
@media(max-width:650px){
 body .hba-log-screen .hba-saved-panel>ul.hba-meal-grid{
  grid-template-columns:repeat(auto-fit,minmax(min(100%,224px),1fr))!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body .hba-log-screen :is(.hba-meal-tile,.hba-mini-ingredient,.hba-tile-add){transition:none!important}
}

/* HealthByAI semantic palette refresh v4: dark, warm, color-coded */
:root,html.dark{
 --energy:#ffae5c;--carbs:#edc56f;--macros:#58d2b2;--fatty:#ea95a8;
 --fibre:#7bd2a3;--vitamins:#f1c374;--minerals:#bfa2ef;--amino:#ec8ba5;
 --success:#53d995;--critical:#ff6f7f;--attention:#f1ad62;
 --chart-1:#f3a65c;--chart-2:#62d0b2;--chart-3:#f1c56e;--chart-4:#e996aa;--chart-5:#baabec;
 --ring:#f1b579;--primary:#f2bc87;--primary-foreground:#15110b;
 --fb-blue:#e1ae7b;--fb-blue2:#bd865c;--fb-glow:rgba(235,157,84,.17);--fb-glow2:rgba(227,180,115,.16);
 --sidebar-ring:#eab27a;--sidebar-primary:rgba(229,162,95,.18);--sidebar-accent:rgba(231,156,91,.10);
 --accent:rgba(229,157,91,.13);--accent-foreground:#f2dbc3
}
html.dark body:has(aside){
 background:radial-gradient(ellipse at 10% -10%,rgba(231,135,60,.115),transparent 37%),radial-gradient(ellipse at 94% 15%,rgba(69,172,128,.075),transparent 44%),linear-gradient(180deg,#090b0f 0%,#080d11 55%,#080b10 100%)!important
}
html.dark body:has(aside) aside{
 background:radial-gradient(ellipse at 12% 0%,rgba(244,165,96,.095),transparent 42%),linear-gradient(180deg,rgba(17,20,23,.97),rgba(8,11,15,.96))!important;
 border-color:rgba(230,169,109,.18)!important
}
html.dark body:has(aside) aside::before{
 background:linear-gradient(90deg,transparent,rgba(247,185,115,.8),rgba(81,187,145,.44),transparent)!important;
 box-shadow:0 0 13px rgba(248,171,96,.18)!important
}
html.dark body:has(aside) aside nav a.bg-sidebar-primary{
 color:#fff1e3!important;
 border-color:rgba(246,177,112,.24)!important;
 background:linear-gradient(97deg,rgba(209,127,58,.22),rgba(206,165,107,.055))!important;
 box-shadow:inset 0 1px rgba(255,255,255,.045),0 8px 28px rgba(0,0,0,.12)!important
}
html.dark body:has(aside) aside nav a.bg-sidebar-primary::before{
 background:linear-gradient(180deg,#ffcc8c,#e79b62)!important;
 box-shadow:0 0 10px rgba(250,173,92,.44)!important
}
html.dark body:has(aside) aside nav a:hover{
 background:linear-gradient(90deg,rgba(232,145,74,.12),rgba(201,142,83,.025))!important;
 border-color:rgba(234,181,121,.14)!important
}
html.dark body:has(aside) aside nav a svg{color:#c1aaa0}
html.dark body:has(aside) aside nav a[href*="dashboard"] svg{color:#f3a965}
html.dark body:has(aside) aside nav a[href*="log"] svg{color:#63d9b3}
html.dark body:has(aside) aside nav a[href*="nutrition"] svg,
html.dark body:has(aside) aside nav a[href*="food"] svg{color:#eec879}
html.dark body:has(aside) aside nav a[href*="ean"] svg,
html.dark body:has(aside) aside nav a[href*="scan"] svg{color:#c4aced}
html.dark body:has(aside) aside nav a[href*="profile"] svg{color:#ee95a9}
html.dark body:has(aside) aside nav a[href*="source"] svg{color:#79d0dc}
html.dark body:has(aside) .text-energy{color:var(--energy)!important}
html.dark body:has(aside) .text-macros{color:var(--macros)!important}
html.dark body:has(aside) .text-carbs{color:var(--carbs)!important}
html.dark body:has(aside) .text-fatty{color:var(--fatty)!important}
html.dark body:has(aside) .text-success{color:var(--success)!important}
html.dark body:has(aside) .text-critical{color:var(--critical)!important}
html.dark body:has(aside) .text-attention{color:var(--attention)!important}
html.dark body:has(aside) .border-energy{border-color:rgba(244,171,93,.37)!important}
html.dark body:has(aside) .border-macros{border-color:rgba(97,212,178,.37)!important}
html.dark body:has(aside) .border-carbs{border-color:rgba(232,193,103,.37)!important}
html.dark body:has(aside) .border-fatty{border-color:rgba(235,148,173,.37)!important}
html.dark body:has(aside) .bg-energy\\/10{background:rgba(238,159,78,.11)!important}
html.dark body:has(aside) .bg-macros\\/10{background:rgba(81,200,157,.11)!important}
html.dark body:has(aside) .bg-carbs\\/10{background:rgba(233,187,97,.11)!important}
html.dark body:has(aside) .bg-fatty\\/10{background:rgba(233,145,164,.11)!important}
html.dark body:has(aside) :is(button,a,input,select):focus-visible{outline-color:#f1b677;outline-offset:2px}
/* Period cards: calories amber, protein mint, carbs gold */
#hba-period-clean .hba-period-heading{color:#f0c18f}
#hba-period-clean .hba-period-tab.is-active{color:#ffca8a!important}
#hba-period-clean .hba-period-tab.is-active::after{background:#f2ad69!important;box-shadow:0 0 8px rgba(249,166,90,.24)}
#hba-period-clean .hba-period-balance-icon{color:#ecb37b}
#hba-period-clean .hba-period-balance-cell:first-child strong{color:#f5c49a}
#hba-period-clean .hba-period-balance-cell:nth-child(2) strong{color:#e1b9a5}
#hba-period-clean .hba-period-trend:nth-child(1){
 border-color:rgba(248,172,93,.3);
 background:linear-gradient(155deg,rgba(246,153,71,.11),transparent 65%),rgba(13,17,21,.78)
}
#hba-period-clean .hba-period-trend:nth-child(2){
 border-color:rgba(88,211,173,.29);
 background:linear-gradient(155deg,rgba(66,181,141,.10),transparent 65%),rgba(13,17,21,.78)
}
#hba-period-clean .hba-period-trend:nth-child(3){
 border-color:rgba(235,191,97,.29);
 background:linear-gradient(155deg,rgba(234,193,103,.10),transparent 65%),rgba(13,17,21,.78)
}
#hba-period-clean .hba-period-trend:nth-child(1) .hba-period-trend-title>span:first-child{color:#f8b173}
#hba-period-clean .hba-period-trend:nth-child(2) .hba-period-trend-title>span:first-child{color:#70e2bc}
#hba-period-clean .hba-period-trend:nth-child(3) .hba-period-trend-title>span:first-child{color:#f2cd80}
#hba-period-clean .hba-period-trend:nth-child(3) svg path[stroke*="--macros"]{stroke:var(--carbs)!important}
#hba-period-clean .hba-period-trend:nth-child(3) svg circle[fill*="--macros"]{fill:var(--carbs)!important}
#hba-period-clean .hba-goal-marker{color:#5bdf9a}
#hba-period-clean .hba-period-fat-caption-icon{color:#ec9aad}
#hba-period-clean .hba-period-fat-boxes>div:first-child{
 background:linear-gradient(155deg,rgba(43,148,92,.19),rgba(8,42,31,.32))!important;
 border-color:rgba(91,215,140,.40)!important
}
#hba-period-clean .hba-period-fat-boxes>div:last-child{
 background:linear-gradient(155deg,rgba(186,61,77,.19),rgba(53,20,32,.32))!important;
 border-color:rgba(248,115,137,.40)!important
}
#hba-period-clean .hba-period-fat-boxes>div:first-child p{color:#65e3a5!important}
#hba-period-clean .hba-period-fat-boxes>div:last-child p{color:#fb8898!important}
