/* Glassy Dashboard 42 visual treatment for the Fish Market workspaces. */
@font-face {
  font-family: Jura;
  src: url('assets/jura.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --ink: #142642;
  --muted: #455c78;
  --accent: #2058a2;
  --soft: #e4effc;
  --border: #274a762c;
  --glass: #f9fbfff5;
  --glass-edge: #ffffffdf;
  --glass-shadow: 0 18px 44px -30px #06173470, inset 0 1px 0 #fff9;
  --night-edge: #98c3ff35;
  --nav-fill: linear-gradient(155deg, #3472c1, #235392);
  --template-ease: cubic-bezier(.22, 1, .36, 1);
  --template-spring: cubic-bezier(.34, 1.56, .64, 1);
  color: var(--ink);
  background: #08142c;
  font-family: Jura, 'Segoe UI', Arial, sans-serif;
}
body {
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: #08142c;
  min-height: 100dvh;
}
.shell, .seller-shell {
  max-width: 1720px;
  margin: 14px auto;
  width: calc(100% - 28px);
  min-height: calc(100dvh - 28px);
  border: 1px solid var(--night-edge);
  border-radius: 25px;
  background: #102545;
  box-shadow: 0 24px 70px -30px #000c;
}
.shell {display: grid; grid-template-columns: 224px minmax(0, 1fr);}
.sidebar, .seller-sidebar {
  position: sticky;
  top: 14px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-height: calc(100dvh - 28px);
  padding: 16px 12px 12px;
  overflow: hidden;
  border: 0;
  color: #edf5ff;
  background: #112849;
}
.sidebar {border-radius: 24px 0 0 24px; border-right: 1px solid var(--night-edge);}
.sidebar > :nth-child(2) {min-height: 0; overflow-y: auto; padding: 3px; scrollbar-width: thin; scrollbar-color: #628db5aa transparent;}
.sidebar .brand {padding: 0 4px; min-height: 38px; font-size: 22px; display: flex; line-height: 1.15;}
.sidebar .brand-name {display: block;}
.brandmark {border-radius: 12px; background: #285e9d; box-shadow: inset 0 1px 0 #fff6; flex-shrink: 0;}
.sidebar > .sidebar-bottom {position: static; margin: 0; display: block; background: transparent;}
.sidebar-bottom .person {display: none;}
.owner-top-logout {display: inline-grid;}
.sidebar .nav, .seller-sidebar .seller-tabs {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 1px;
  padding: 2px;
  margin: 0;
}
.sidebar .nav button, .seller-sidebar .seller-tabs .btn {
  flex: 0 0 auto;
  justify-content: flex-start;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  gap: 10px;
  border: 0;
  border-radius: 13px;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 700;
  text-align: left;
  white-space: normal;
  color: #eaf3ff;
  background: transparent;
}
.sidebar .nav span, .sidebar-bottom .nav span {display: inline; min-width: 0; overflow-wrap: anywhere;}
.sidebar .nav svg {display: block; flex: 0 0 18px; width: 18px; height: 18px;}
.sidebar .nav button:hover, .seller-sidebar .seller-tabs .btn:hover {background: #d0e7ff25;}
.sidebar .nav button.active, .seller-sidebar .seller-tabs .btn[aria-current='page'], .crm-nav-highlight {
  background: var(--nav-fill);
  color: white;
  box-shadow: inset 0 1px 0 #c5e2ff55, 0 6px 16px #0003;
}
.sidebar-bottom {border-top: 1px solid var(--night-edge); padding-top: 8px;}
.liquid-nav {position: relative; isolation: isolate;}
.liquid-nav .crm-nav-highlight {position: absolute; inset: 0 2px auto; z-index: 0; pointer-events: none; border-radius: 13px;}
.sidebar .liquid-nav button {position: relative; z-index: 1;}
.sidebar .liquid-nav button.active {background: transparent; box-shadow: none;}
.workspace > .topbar {height: 56px; justify-content: flex-end; padding: 7px 18px; color: #edf5ff;}
.top-right {gap: 8px; color: inherit;}
.topbar .iconbtn {color: inherit;}
.workspace > main, #app .seller-shell > main {
  padding: 18px;
  margin: 0 10px 10px 0;
  border-radius: 19px;
  background: #eaf2fc;
}
.workspace > .scheme-main {padding: 0; background: transparent;}
.workspace > main > .page-head {
  background: var(--glass);
  padding: 16px 20px;
  border: 1px solid var(--glass-edge);
  border-radius: 21px;
  height: auto;
  margin-bottom: 12px;
}
.scheme-main {
  position: relative;
  --scheme-ink: #edf6ff;
  --scheme-muted: #d1e4fa;
  --scheme-edge: #bedcff5e;
  --scheme-tint: linear-gradient(115deg, #d4eaff36, #a8d3ff11 44%, #9ac8ff24);
}
.scheme-toolbar {position: absolute; top: 19px; left: 22px; z-index: 2; height: auto; margin: 0; pointer-events: none;}
.form-body label, .stock-filters label {color: var(--ink);}
.scheme-toolbar h1, .node-name, .thought-heading h2, .thought-actions button {color: var(--scheme-ink);}
.scheme-toolbar h1 {font-size: 25px; font-weight: 700;}
.business-node, .business-node.hub {font-size: 17px; font-weight: 700;}
.node-name {text-shadow: 0 2px 7px #051329;}
.thought-heading h2, .thought-actions button {font-size: 17px; font-weight: 700;}
.panel, dialog, .login-page form, .startup {
  border: 1px solid var(--glass-edge);
  border-radius: 22px;
  background: var(--glass);
  box-shadow: var(--glass-shadow);
}
.business-canvas {
  height: calc(100dvh - 96px);
  min-height: 455px;
  container-type: inline-size;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 81% 1%, #5c91cc4d, transparent 60%),
    radial-gradient(ellipse at 13% 100%, #315f9870, transparent 57%),
    #112747;
}
.business-canvas::before, .node-circle::before, .thought-window::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--scheme-edge);
  border-radius: inherit;
  pointer-events: none;
}
.business-canvas::before {
  background: linear-gradient(135deg, #cce6ff1c, #7fbaff0b 52%, #a8d7ff20);
  box-shadow: inset 0 1px 0 #ffffff32, inset 0 0 0 1px #bbd9ff0f, 0 20px 40px -26px #040e20;
  backdrop-filter: blur(27px) saturate(1.38);
}
.business-links path {stroke: #a5cef297; stroke-width: 1.65; stroke-linecap: round;}
.business-links .point-link {stroke: #a5cef296; stroke-width: 1.3;}
.node-circle, .hub .node-circle, .points-node .node-circle {
  position: relative;
  isolation: isolate;
  background: transparent;
  border: 0;
  color: #d7edff;
  box-shadow: none;
}
.node-circle::before {
  background: var(--scheme-tint), #6ea6e81e;
  box-shadow: inset 0 1px 1px #e2f3ff47, inset 0 0 12px #acd8ff24, 0 12px 22px -13px #020b1d;
  backdrop-filter: blur(14px) saturate(1.4);
  transition: border-color .23s var(--template-ease), box-shadow .26s var(--template-ease), background-color .23s var(--template-ease);
}
.hub .node-circle::before {
  border-color: #c5e3ff9c;
  background-color: #79b8ff3d;
  box-shadow: inset 0 1px 1px #e2f3ff63, inset 0 0 17px #acd8ff3d, 0 10px 27px -12px #4f94df99;
}
.points-node .node-circle::before {border-style: dashed;}
.node-circle img {filter: drop-shadow(0 4px 6px #0418358c);}
.business-node:hover .node-circle, .business-node.is-open .node-circle, .is-driving .node-circle {background: transparent; box-shadow: none;}
.business-node:hover .node-circle::before, .business-node.is-open .node-circle::before {
  border-color: #d9edffc7;
  background-color: #64aefa50;
  box-shadow: inset 0 1px 1px #e2f3ff63, inset 0 0 14px #acd8ff38, 0 0 0 4px #81b9ff25, 0 8px 25px -10px #499bfb91;
}
.business-node.is-open .node-name {color: #d7eeff;}
.business-node:focus-visible .node-circle {outline-color: #acd9ff;}
.thought-window {
  isolation: isolate;
  background: transparent;
  border: 0;
  border-radius: 19px;
  box-shadow: none;
  width: clamp(224px, 36cqw, 284px);
}
.thought-window::before {
  background: var(--scheme-tint), #112c4bed;
  box-shadow: inset 0 1px 1px #e2f3ff49, 0 18px 46px #050f24a6;
  backdrop-filter: blur(18px) saturate(1.38);
}
.thought-heading {border-bottom-color: #c3e1ff35;}
.thought-heading .iconbtn, .thought-actions button svg, .thought-actions button svg:last-child {color: #bbdbff;}
.thought-actions button:hover, .thought-window .iconbtn:hover {background: #abd5ff28;}
.thought-link i {border-color: #c7e5ff9c; background: #42638b;}
.car-route-status, .is-at-point .car-route-status {font-size: 14px; font-weight: 700; color: var(--scheme-muted);}
.car-point-badge {border-color: #284c74; background: #5199ea; color: #0b2240;}
.car-route-point, .car-route-point.is-done {border-color: #badcfa73; background: #182f50; color: var(--scheme-muted);}
.car-route-point.is-skipped {color: #aac2df;}
.car-route-point.is-current, .car-route-point.is-arrived {border-color: #afd8fb; background: #b1daff; color: #132b4a; box-shadow: 0 0 0 3px #80baff38;}
.car-motion-road i {background: #c0e2ff;}
.textbtn {color: var(--accent);}
.iconbtn:hover {background: #5394de22;}
.btn, .iconbtn, .preview-control button {border-radius: 999px;}
.btn {background: #fcfdff; border-color: #274a763a; font-size: 16px; font-weight: 700;}
.btn:hover {background: #e8f2ff;}
.btn.primary {background: #255b9e; border-color: #255b9e; box-shadow: inset 0 1px 0 #fff2;}
.btn.primary:hover {background: #194b89;}
.pill, .pending-badge {border-radius: 999px;}
input, select, textarea {border-color: #294c7a50; border-radius: 12px; background: #fff; font-size: 16px;}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {outline: 2px solid #4b8edf; outline-offset: 2px;}
table th, .stock-table tbody th, .market-receipt-table tbody th {background: #e9f1fc; color: var(--ink);}
table td {border-top-color: var(--border);}
.panel-head, .dialog-head, .dialog-foot {border-bottom-color: var(--border);}
.form-note {background: #eaf2fd; color: #314f73; border-radius: 10px;}
.object-back, .footer-note {padding: 5px 12px; border-radius: 12px; background: #f6faff;}
dialog {background: #f9fcff;}
dialog::backdrop {background: #06152b99; backdrop-filter: blur(4px);}
.seller-top {border-radius: 24px 24px 0 0; background: transparent; color: #edf5ff; border: 0;}
.seller-top p {color: #dceaff;}
.seller-shell:has(.seller-sidebar) {display: grid; grid-template-columns: 224px minmax(0, 1fr); align-content: start;}
.seller-shell > :not(main, .seller-sidebar) {grid-column: 1 / -1;}
.seller-sidebar {grid-column: 1; border-radius: 0 19px 0 24px;}
.seller-shell > main > .page-head {background: var(--glass); border-radius: 22px; padding: 18px;}
#app .seller-shell:not(:has(.seller-sidebar)) > main {margin-left: 10px;}
.login-page {background: transparent;}
.login-page form {color: var(--ink);}
.startup {background: #f9fcff;}
#toast {background: #173e71; border-radius: 14px; font-size: 16px;}
.shipment-driver-details {display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0;}
.shipment-driver-details dt {font-size: 15px; color: var(--muted);}
.shipment-driver-details dd {margin: 4px 0 0;}
.preview-control {display: inline-flex; border: 1px solid #fff6; border-radius: 999px; padding: 3px; background: #ffffff1c;}
.preview-control button {border: 0; background: transparent; color: inherit; min-height: 32px; padding: 5px 11px; font-size: 15px; font-weight: 700;}
.preview-control button[aria-pressed='true'] {background: #edf5ff; color: var(--ink);}
.crm-menu-toggle, .crm-menu-shade {display: none;}
.small, small, .muted.small, .page-head p, .textbtn, .footer-note, .kpi-label,
.request-row, .trip-row, .document-title, .empty-state, .form-note, .form-field > label, .login-page .form-field > label,
.login-page p, .seller-top p, .stock-filters label, .filter-row label, .cart-line label, .cart-footer > label {font-size: 15px;}
.pill, .pending-badge, table th, table td {font-size: 15px;}
.panel-head .compact-actions .btn, .seller-top .compact-actions .btn, .source-tabs .btn,
.shop-activity-controls .btn, .shop-activity-filters .btn, .shop-activity-pagination .btn {font-size: 15px;}
.shop-activity-controls label, .shop-activity-kpi span, .shop-activity-note, .shop-activity-product {font-size: 15px; color: var(--muted);}
.crumb, .section-help, .history-row > span, .route-order, .integration-items p {font-size: 15px;}

/* Timing and entry motion from Glassy Dashboard 42. */
.crm-view-enter > :is(.business-canvas, .panel, .stack, .dashboard-grid) {
  animation: glass-card-in .8s var(--template-ease) 75ms backwards;
}
.crm-view-enter > :is(.scheme-toolbar, .page-head, .object-back) {
  animation: glass-rise .7s var(--template-ease) backwards;
}
.thought-window {animation: glass-pop-open .32s var(--template-ease) backwards;}
dialog[open] {animation: glass-modal-in .5s var(--template-spring) backwards;}
dialog[open]::backdrop {animation: glass-fade .3s ease backwards;}
#toast.visible {animation: glass-toast-in .5s var(--template-spring) backwards;}
:is(.btn, .iconbtn, .crm-menu-toggle) {
  transition: scale .2s var(--template-spring), background-color .2s ease, border-color .2s ease;
}
:is(.btn, .iconbtn, .crm-menu-toggle):active {scale: .96;}
@media (hover: hover) {
  .thought-actions button:hover > svg:first-child, .sidebar .nav button:hover > svg {
    animation: glass-wiggle .5s var(--template-ease);
  }
}
@keyframes glass-card-in {
  from {opacity: 0; transform: translateY(24px) scale(.975);}
  to {opacity: 1; transform: none;}
}
@keyframes glass-rise {
  from {opacity: 0; transform: translateY(12px); filter: blur(6px);}
  to {opacity: 1; transform: none; filter: none;}
}
@keyframes glass-pop-open {
  from {opacity: 0; transform: translateY(-6px) scale(.95);}
  to {opacity: 1; transform: none;}
}
@keyframes glass-modal-in {
  from {opacity: 0; transform: translateY(30px) scale(.94);}
  to {opacity: 1; transform: none;}
}
@keyframes glass-fade {from {opacity: 0;} to {opacity: 1;}}
@keyframes glass-toast-in {
  from {opacity: 0; translate: 0 24px; scale: .92;}
  to {opacity: 1; translate: 0; scale: 1;}
}
@keyframes glass-wiggle {
  0%,100% {rotate: 0deg;}
  35% {rotate: -14deg;}
  70% {rotate: 10deg;}
}
body[data-screen='tablet'] :is(.shell,.seller-shell) {max-width: 834px;}
body[data-screen='tablet'] :is(.shell,.seller-shell:has(.seller-sidebar)) {grid-template-columns: 188px minmax(0, 1fr);}
body[data-screen='tablet'] .sidebar {padding-inline: 9px;}
body[data-screen='tablet'] .sidebar .nav button {padding-inline: 5px; gap: 7px;}
body[data-screen='tablet'] :is(.dashboard-grid,.pos-grid) {grid-template-columns: 1fr;}
body[data-screen='tablet'] .kpis {grid-template-columns: repeat(2,minmax(0,1fr));}
body[data-screen='tablet'] .business-node {width: 138px;}
@media (max-width: 940px) {
  .shell, .seller-shell:has(.seller-sidebar) {grid-template-columns: 188px minmax(0, 1fr);}
  .sidebar, .seller-sidebar {padding-inline: 9px;}
  .sidebar .nav button {padding-inline: 7px; gap: 8px;}
  .sidebar .brand {font-size: 20px;}
}
@media (max-height: 810px) and (min-width: 721px) {
  .business-node {transform: translate(-50%, -37px); gap: 9px;}
  .node-circle {width: 74px; height: 74px;}
  .node-circle img {width: 46px; height: 46px;}
  .business-node.hub {transform: translate(-50%, -46px);}
  .hub .node-circle {width: 92px; height: 92px;}
  .hub .node-circle img {width: 60px; height: 60px;}
  .points-node {transform: translate(-50%, -25px);}
  .points-node .node-circle {width: 50px; height: 50px;}
}
@media (max-width: 720px) {
  .shell,.seller-shell {width: calc(100% - 12px); margin: 6px auto; border-radius: 20px;}
  :is(.shell, .seller-shell:has(.seller-sidebar)), body[data-screen='tablet'] :is(.shell, .seller-shell:has(.seller-sidebar)) {display: block;}
  .sidebar, .seller-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 21; width: min(288px, 83vw); max-height: 100dvh; padding: 15px;
    border-radius: 0 22px 22px 0; visibility: hidden; translate: -100% 0;
    transition: translate .5s var(--template-ease), visibility 0s linear .5s;
  }
  .seller-sidebar {overflow-y: auto;}
  body[data-crm-menu='open'] :is(.sidebar, .seller-sidebar) {translate: 0 0; visibility: visible; transition-delay: 0s;}
  .crm-menu-toggle {display: inline-flex; color: #edf5ff; height: 38px; border: 1px solid var(--night-edge); border-radius: 12px; padding: 5px 9px; gap: 6px; align-items: center; background: #203e65; font-size: 15px; font-weight: 700;}
  .crm-menu-toggle svg {width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;}
  .crm-menu-shade {display: block; position: fixed; z-index: 20; inset: 0; background: #060e21a6; opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s linear .3s;}
  body[data-crm-menu='open'] .crm-menu-shade {visibility: visible; opacity: 1; transition-delay: 0s;}
  .sidebar .nav button {min-height: 42px;}
  .workspace > .topbar {justify-content: space-between; padding: 6px 9px; gap: 5px;}
  .top-right {gap: 3px;}
  .preview-control button {padding-inline: 6px;}
  .workspace > main, #app .seller-shell > main {padding: 10px 9px 14px; margin: 0 5px 5px;}
  .workspace > .scheme-main {padding: 0;}
  .scheme-toolbar {top: 16px; left: 15px; padding: 0;}
  .business-canvas {min-height: 585px;}
  .business-node, .business-node.hub {font-size: 15px;}
  .business-node.hub {width: 155px;}
  .kpi-value {font-size: 23px;}
  .seller-top {border-radius: 18px 18px 0 0; flex-wrap: wrap;}
}
@media (prefers-reduced-motion: reduce) {
  .crm-view-enter > *, .thought-window, dialog[open], dialog[open]::backdrop, #toast.visible,
  .thought-actions button:hover > svg:first-child, .sidebar .nav button:hover > svg {animation: none;}
  .sidebar, .seller-sidebar, .crm-menu-shade, .btn, .iconbtn, .crm-menu-toggle {transition: none;}
  .node-circle::before {transition: none;}
}
@media print {
  body {background: white;}
  body:has(.shipment-print[open]) > :not(.shipment-print) {display: none !important;}
  .shipment-print[open] {position: static; margin: 0; inset: auto; width: 100%; max-width: none; max-height: none; border: 0; border-radius: 0; box-shadow: none; background: white; overflow: visible; animation: none;}
  .shipment-print::backdrop, .shipment-print .dialog-foot, .shipment-print .dialog-head button {display: none;}
}
