/*
  TEDY ABERA LANGANO FURNITURE ERP — LUXURY V9 POLISH 2026-11-04
  Additive stylesheet, intended to load AFTER currently installed V8 theme.
  Presentation only: no data operations, no JS, no auth/role/workflow edits.
  Remove the V9 <link> from index.html to roll back.
*/
html[data-m18-ui] {
  --t9-deep:#031a12;
  --t9-forest:#062b1e;
  --t9-emerald:#0d3d2c;
  --t9-ivory:#f6f3e9;
  --t9-gold:#f4d48a;
  --t9-gold-hi:#fff0c1;
  --t9-gold-rim:rgba(245,209,128,.43);
  --t9-gold-metal:linear-gradient(115deg,#95692b 0%,#bf8d40 17%,#f6d78c 36%,#fff2c5 49%,#ce9841 69%,#f4d48a 85%,#9b7031 100%);
}

/* Establish a dark, polished loading screen; never alter display/visibility. */
#splash:not([hidden]) {
  background: radial-gradient(ellipse at 50% 35%, #145037 0%, #062a1d 36%, #02130d 92%) !important;
  color:#f2d69b !important;
  text-shadow:0 2px 14px rgba(0,0,0,.35);
}
#splash:not([hidden])::before {
  content:"";
  display:block;
  width:36px;height:36px;
  margin:0 auto 16px;
  border-radius:50%;
  border:2px solid rgba(244,207,125,.22);
  border-top-color:#ffe8a8;
  box-shadow:0 0 18px rgba(236,191,99,.10);
  animation:t9-spin 1.1s linear infinite;
}
#splash:not([hidden]) p {color:#f0deba!important;opacity:.88!important;font-size:13px!important;letter-spacing:.01em;}
@keyframes t9-spin {to {transform:rotate(360deg)}}

/* Navigation: deeper emerald, precise gold, crisp accessible typography. */
html[data-m18-ui] #app #sidebar {
  background:radial-gradient(circle at 12% 0%,rgba(37,105,71,.28),transparent 42%),linear-gradient(171deg,#082e21 0%,#04241a 52%,#021710 100%)!important;
  border-right:1px solid var(--t9-gold-rim)!important;
}
html[data-m18-ui] #app #sidebar .brand h1 {color:#f6da95!important;line-height:1.35!important;}
html[data-m18-ui] #app #sidebar .nav-group-title {color:#f0cf86!important;letter-spacing:0!important;}
html[data-m18-ui] #app #sidebar #nav .nav-btn {
  background:linear-gradient(110deg,rgba(27,87,60,.22),rgba(6,38,26,.07))!important;
  border:1px solid rgba(241,199,115,.18)!important;
  border-radius:13px!important;
  color:#f0f2e9!important;
  box-shadow:inset 0 1px 0 rgba(255,241,204,.035)!important;
  -webkit-tap-highlight-color:transparent;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn .ico {color:#f1d18c!important;filter:none!important;}
html[data-m18-ui] #app #sidebar #nav .nav-btn:is(.active,.is-active,[aria-current="page"],[aria-selected="true"]) {
  background:var(--t9-gold-metal)!important;
  border-color:#ffedb2!important;
  box-shadow:inset 0 1px 0 rgba(255,253,231,.72),0 6px 15px rgba(0,0,0,.24)!important;
  color:#153022!important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn:is(.active,.is-active,[aria-current="page"],[aria-selected="true"]) :is(.ico,.label,svg) {
  color:#143020!important;-webkit-text-fill-color:#143020!important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn:focus-visible {outline:2px solid #ffdfa0!important;outline-offset:2px!important;}

/* Photo-first owner view. Do not crop or replace the original uploaded image. */
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome {
  background:radial-gradient(ellipse at 8% 0%,rgba(58,122,84,.25),transparent 44%),linear-gradient(160deg,#0c3b2a 0%,#062b1f 60%,#031c14 100%)!important;
  border:1px solid rgba(241,204,120,.53)!important;
  box-shadow:inset 0 1px 0 rgba(255,241,203,.10),0 13px 28px rgba(0,0,0,.26)!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo {
  background:#f5f2ec!important;
  border:1px solid #f0cf85!important;
  border-radius:16px!important;
  box-shadow:0 0 0 1px rgba(255,246,215,.32),0 12px 30px rgba(0,0,0,.26)!important;
  overflow:hidden!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo img {
  display:block!important;
  width:100%!important;height:auto!important;
  min-height:0!important;max-height:none!important;
  object-fit:contain!important;object-position:center center!important;
  filter:brightness(1.047) contrast(1.022) saturate(.81) hue-rotate(3deg)!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-brand-title {
  color:#ffe2a1!important;-webkit-text-fill-color:#ffe2a1!important;
  text-shadow:0 1px 0 rgba(255,246,208,.14),0 4px 15px rgba(0,0,0,.18)!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-line {
  background:linear-gradient(90deg,transparent,#ad7d34 15%,#f4d58b 43%,#fff1bf 50%,#ce9843 77%,transparent)!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-scroll-tip {
  border-color:rgba(242,207,127,.72)!important;
  color:#ffe5a5!important;-webkit-text-fill-color:#ffe5a5!important;
  background:linear-gradient(145deg,#164533,#083024 65%,#042016)!important;
  box-shadow:inset 0 1px 0 rgba(255,246,214,.13),0 5px 13px rgba(0,0,0,.22)!important;
}
/* Only owner summary cards, never inventory forms or other screens. */
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi {
  background:radial-gradient(ellipse at 100% 0%,rgba(39,112,76,.32),transparent 48%),linear-gradient(150deg,#104330,#082e22 55%,#041e16 100%)!important;
  border:1px solid rgba(242,204,121,.42)!important;
  border-radius:17px!important;
  box-shadow:inset 0 1px 0 rgba(255,244,211,.10),0 8px 19px rgba(0,0,0,.18)!important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > b {
  color:#ffe1a1!important;-webkit-text-fill-color:#ffe1a1!important;
  text-shadow:0 1px 0 rgba(255,246,208,.13)!important;
  font-weight:700!important;
  font-variant-numeric:tabular-nums;
}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > span {color:#e8f0e8!important;opacity:1!important;}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > small {color:#cedfd2!important;opacity:1!important;}

@media (max-width:900px) {
  html[data-m18-ui] #app .topbar {padding:5px 7px!important;gap:6px!important;}
  html[data-m18-ui] #app .topbar .menu-toggle {min-width:44px!important;min-height:44px!important;}
  html[data-m18-ui] #app .topbar > .branch-context-m6 {min-width:0!important;flex:1 1 auto!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard {padding:7px 8px max(28px,env(safe-area-inset-bottom))!important;overflow-x:clip!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome {
    display:flex!important;flex-flow:column nowrap!important;align-items:center!important;
    justify-content:flex-start!important;grid-template-columns:none!important;grid-template-rows:none!important;
    box-sizing:border-box!important;width:100%!important;max-width:100%!important;
    min-height:0!important;height:auto!important;
    padding:9px 8px 11px!important;gap:4px!important;margin:0 0 16px!important;
    border-radius:20px!important;overflow:hidden!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome > * {
    position:static!important;grid-column:auto!important;grid-row:auto!important;
    min-width:0!important;max-width:100%!important;writing-mode:horizontal-tb!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-clock {
    order:0!important;align-self:center!important;margin:0!important;padding:2px 8px!important;
    max-height:none!important;font-size:9px!important;line-height:1.32!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-brand-symbol {
    order:1!important;display:flex!important;align-self:center!important;
    align-items:center!important;justify-content:center!important;
    height:auto!important;max-height:28px!important;max-width:33px!important;
    margin:0!important;padding:0!important;font-size:23px!important;line-height:1!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-brand-title {
    order:2!important;align-self:stretch!important;text-align:center!important;
    font-size:clamp(13px,3.3vw,15px)!important;line-height:1.2!important;
    padding:0 4px!important;margin:0!important;overflow-wrap:break-word!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-brand-title span {display:block!important;font-size:.82em!important;line-height:1.18!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-line {order:3!important;align-self:center!important;width:72%!important;height:1px!important;min-height:1px!important;margin:3px 0!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo {
    order:4!important;display:block!important;position:relative!important;align-self:stretch!important;
    flex:0 0 auto!important;box-sizing:border-box!important;
    width:100%!important;max-width:100%!important;min-height:0!important;height:auto!important;
    max-height:none!important;margin:0!important;padding:0!important;aspect-ratio:auto!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo img {
    width:100%!important;height:auto!important;min-height:0!important;
    max-height:none!important;max-width:100%!important;object-fit:contain!important;aspect-ratio:auto!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-scroll-tip {
    order:5!important;position:relative!important;flex:0 0 auto!important;
    align-self:center!important;min-width:44px!important;min-height:44px!important;
    width:44px!important;height:44px!important;padding:0!important;margin:5px auto 0!important;border-radius:50%!important;
  }
  /* V8 already proves 2-column KPI. Keep it, increase text legibility. */
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-flow:row!important;gap:10px!important;width:100%!important;
    min-width:0!important;max-width:100%!important;margin:0 0 20px!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid > * {
    grid-column:auto!important;grid-row:auto!important;min-width:0!important;
    max-width:100%!important;width:auto!important;box-sizing:border-box!important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid > :first-child {grid-column:1 / -1!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi {padding:13px 10px!important;min-height:111px!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > b {display:block!important;font-size:clamp(15px,3.95vw,21px)!important;line-height:1.34!important;overflow-wrap:anywhere!important;white-space:normal!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid > :first-child > b {font-size:clamp(21px,5.4vw,29px)!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > span,
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > small {display:block!important;font-size:clamp(11px,2.85vw,12.8px)!important;line-height:1.45!important;overflow-wrap:break-word!important;}
  /* Sidebar: brand and footer stay, only actual #nav scrolls. */
  html[data-m18-ui] #app #sidebar {
    position:fixed!important;top:0!important;left:0!important;
    width:min(88vw,340px)!important;height:100dvh!important;max-height:100dvh!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
    padding:max(12px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom))!important;
    border-radius:0 21px 21px 0!important;
  }
  html[data-m18-ui] #app #sidebar > .brand,
  html[data-m18-ui] #app #sidebar > .sidebar-footer,
  html[data-m18-ui] #app #sidebar > .m18-correction-entry {flex:0 0 auto!important;}
  html[data-m18-ui] #app #sidebar #nav {
    flex:1 1 auto!important;display:block!important;min-height:0!important;height:auto!important;
    overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;scroll-behavior:auto!important;
    scrollbar-width:thin!important;scrollbar-color:#e9c47c transparent!important;
    padding:8px 4px 22px 0!important;
  }
  html[data-m18-ui] #app #sidebar #nav::-webkit-scrollbar {width:4px;}
  html[data-m18-ui] #app #sidebar #nav::-webkit-scrollbar-track {background:transparent;}
  html[data-m18-ui] #app #sidebar #nav::-webkit-scrollbar-thumb {background:linear-gradient(180deg,#a06f2e,#f4d28a 41%,#fff2c5 52%,#bd8b3d);border-radius:10px;}
  html[data-m18-ui] #app #sidebar #nav .nav-btn {
    min-height:48px!important;padding:11px 12px!important;margin:4px 0!important;
    line-height:1.4!important;transition:background-color .14s,border-color .14s,box-shadow .14s,transform .10s!important;
  }
  html[data-m18-ui] #app #sidebar #nav .nav-btn .label {font-size:clamp(14px,3.7vw,16px)!important;line-height:1.48!important;overflow-wrap:anywhere!important;}
}
@media (max-width:350px) {
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi {padding:11px 8px!important;}
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > b {font-size:clamp(13px,3.9vw,17px)!important;}
}
@media (hover:hover) and (pointer:fine) {
  html[data-m18-ui] #app #sidebar #nav .nav-btn:not(.active):hover {
    background:linear-gradient(110deg,rgba(230,192,106,.13),rgba(10,62,43,.23))!important;
    border-color:rgba(241,209,135,.44)!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  #splash:not([hidden])::before {animation:none!important;}
  html[data-m18-ui] #app #sidebar #nav .nav-btn {transition:none!important;}
}


/* ====================================================================
   TEDY ERP · V9.1 • CSS-only precision polish • 2026-11-04
   Keeps original girl photo, brand, navigation, ERP records and logic.
   Deliberately no modification to index.html, auth, Supabase or scripts.
   ==================================================================== */
html[data-m18-ui] {
  --t91-emerald-0:#021710;
  --t91-emerald-1:#062d20;
  --t91-gold:#f5d78e;
  --t91-gold-edge:rgba(247,212,136,.49);
  --t91-ink:#f2f6ef;
  --t91-metal:linear-gradient(112deg,#92652b 0%,#c79345 18%,#f3d38b 35%,#fff2c7 49%,#d19b45 67%,#ebc478 84%,#9b6d2d 100%);
}
/* Consistent green-black framing: color depth without expensive blur. */
html[data-m18-ui] #app .topbar {
  background:linear-gradient(115deg,#083423 0%,#05291d 62%,#021811 100%) !important;
  border-bottom:1px solid var(--t91-gold-edge) !important;
  box-shadow:0 1px 0 rgba(255,246,218,.07) inset,0 7px 22px rgba(0,0,0,.17) !important;
}
/* The photo remains the hero. No crop; use natural aspect ratio. */
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome {
  background:radial-gradient(ellipse at 15% 0%,rgba(26,107,70,.24),transparent 48%),linear-gradient(160deg,#0a3a2a,#04271c 67%,#021b14) !important;
  border-color:rgba(248,215,144,.56) !important;
  box-shadow:inset 0 1px 0 rgba(255,246,214,.12),0 12px 28px rgba(0,0,0,.23) !important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo {
  background:#f7f4ef !important;
  border-color:#efcb80 !important;
  box-shadow:0 0 0 1px rgba(255,246,215,.22),0 14px 27px rgba(0,0,0,.20) !important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo img {
  display:block !important;
  object-fit:contain !important;
  object-position:center !important;
  filter:brightness(1.052) contrast(1.018) saturate(.88) !important;
}
/* Uniform metallic detail, legible typography. */
html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-scroll-tip {
  color:#ffe8ad !important;
  border-color:rgba(245,213,142,.73) !important;
  background:linear-gradient(150deg,#154833,#093023 70%,#052016) !important;
  box-shadow:inset 0 1px 0 rgba(255,249,223,.15),0 4px 12px rgba(0,0,0,.23) !important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi {
  background:radial-gradient(circle at 92% -10%,rgba(49,116,78,.29),transparent 48%),linear-gradient(152deg,#104331 0%,#082d21 66%,#041f17 100%) !important;
  border:1px solid rgba(240,203,124,.46) !important;
  box-shadow:inset 0 1px 0 rgba(255,245,211,.09),0 8px 19px rgba(0,0,0,.17) !important;
}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > b {
  color:#ffdf9c !important;
  -webkit-text-fill-color:#ffdf9c !important;
  font-weight:700 !important;
  font-variant-numeric:tabular-nums;
}
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > span,
html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > small {
  color:#e1eee3 !important;
  opacity:1 !important;
}
html[data-m18-ui] #app #sidebar {
  background:radial-gradient(ellipse at 10% 0%,rgba(35,113,72,.29),transparent 50%),linear-gradient(172deg,#082d20,#05241a 58%,#02160f) !important;
  border-right:1px solid var(--t91-gold-edge) !important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn {
  color:#eaf2e8 !important;
  border-color:rgba(244,202,118,.18) !important;
  background:linear-gradient(110deg,rgba(28,91,60,.20),rgba(5,37,26,.06)) !important;
  text-decoration:none !important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn:is(.active,.is-active,[aria-current="page"],[aria-selected="true"]) {
  background:var(--t91-metal) !important;
  color:#13271e !important;
  border-color:#f9df9b !important;
  box-shadow:inset 0 1px 0 rgba(255,251,227,.73),0 6px 16px rgba(0,0,0,.23) !important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn:is(.active,.is-active,[aria-current="page"],[aria-selected="true"]) :is(.label,.ico) {
  color:#13271e !important;
  -webkit-text-fill-color:#13271e !important;
}
html[data-m18-ui] #app #sidebar #nav .nav-btn:focus-visible {
  outline:2px solid #ffe5a5 !important;
  outline-offset:2px !important;
}
@media(max-width:900px) {
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome {
    gap:4px !important;
    padding:9px 9px 10px !important;
    margin-bottom:14px !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-clock {
    padding:2px 9px !important;
    font-size:10px !important;
    line-height:1.35 !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-brand-title {
    font-size:clamp(13px,3.55vw,16px) !important;
    line-height:1.25 !important;
    letter-spacing:0 !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo {
    margin:3px 0 0 !important;
    min-height:0 !important;
    max-height:none !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard > .m18-welcome .m18-photo img {
    width:100% !important;
    height:auto !important;
    max-height:none !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid > :first-child {
    grid-column:1 / -1 !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi-grid > :not(:first-child) {
    grid-column:auto !important;
    min-width:0 !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi {
    min-width:0 !important;
    padding:12px 11px !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > b {
    font-size:clamp(15px,4vw,22px) !important;
    overflow-wrap:anywhere !important;
    line-height:1.35 !important;
  }
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > span,
  html[data-m18-ui] #app #main.m18-owner-dashboard .ctrl-kpi > small {
    font-size:clamp(11.2px,2.9vw,13px) !important;
    line-height:1.5 !important;
  }
  html[data-m18-ui] #app #sidebar #nav {
    overscroll-behavior-y:contain !important;
    -webkit-overflow-scrolling:touch !important;
    touch-action:pan-y !important;
  }
  html[data-m18-ui] #app #sidebar #nav .nav-btn {
    min-height:48px !important;
    padding:11px 12px !important;
    margin:4px 0 !important;
    border-radius:13px !important;
  }
  html[data-m18-ui] #app #sidebar #nav .nav-btn .label {
    font-size:clamp(14px,3.75vw,16px) !important;
    line-height:1.52 !important;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[data-m18-ui] #app #sidebar #nav .nav-btn {transition:none !important;}
  #splash:not([hidden])::before {animation:none !important;}
}
