/* Soft surfaces and fast, decelerating motion. No spring or overshoot. */
:root, :root[data-theme] {
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --text:#202126; --secondary:#50545d; --muted:#747881; --line:#e7e9ee;
  --accent:#2563eb; --radius:20px; --motion-ease:cubic-bezier(.16,1,.3,1);
}
html, body, .main-pane.glass {background:#f5f6f8;}
button, a.navigation-link, summary, [role="tab"] {
  transition:transform 120ms var(--motion-ease),background-color 140ms var(--motion-ease),color 140ms var(--motion-ease),border-color 140ms var(--motion-ease),box-shadow 160ms var(--motion-ease) !important;
  transform:none; transform-origin:center;
}
button:active:not(:disabled), button.is-pressed, a.navigation-link:active, a.navigation-link.is-pressed, summary.is-pressed {
  transform:scale(.975); transition-duration:70ms !important;
}
.icon-button:active:not(:disabled), .icon-button.is-pressed {transform:scale(.92);}
.navigation-scrim:active, .navigation-scrim.is-pressed {transform:none;}
.button.primary:hover {transform:none; background:#1d5de0;}
.button.primary:active:not(:disabled), .button.primary.is-pressed {transform:scale(.975);}
button:disabled {transform:none;}
.button {border-radius:12px; min-height:40px; padding:10px 16px; font-weight:550;}
.button.primary {box-shadow:0 2px 3px #2563eb13 !important;}
.button.secondary {border-color:#e0e3e9; background:#fff;}
.icon-button, .small-icon, .view-switch button, .segment, .filter-button, .menu-item {border-radius:10px;}
.surface, .summary-card, .inventory-panel, .storage-panel, .activity-panel, .product-card, .f-card, .f-metric, .f-panel, .f-table-panel {
  border-radius:20px; border-color:#e6e8ed; box-shadow:0 2px 5px #1f293704 !important;
}
.summary-card, .f-metric {padding:22px;}
.action-tile {border-radius:14px; min-height:64px; padding:16px; border-color:#e6e8ed;}
.action-tile:hover, .product-card:hover, .f-card:hover {transform:none; border-color:#d1d8e5; background:#fcfdff; box-shadow:0 4px 14px #1f293707 !important;}
.action-tile:active:not(:disabled), .product-card:active:not(:disabled), .f-card:active:not(:disabled), .action-tile.is-pressed, .product-card.is-pressed, .f-card.is-pressed {transform:scale(.985);}
.summary-icon, .product-icon, .storage-icon, .doc-icon {border-radius:12px; border-color:transparent; background:#f1f4f9;}
.summary-icon.amber {background:#fff7e9; color:#ad7420;}
.summary-icon.green {background:#edf7f1; color:#26704b;}
.storage-place, .activity-row, .timeline-item {border-radius:12px;}
.input, .location-select {border-radius:11px; border-color:#dfe3ea;}
.input {padding:11px 13px; background:#fff; transition:border-color 140ms var(--motion-ease),box-shadow 140ms var(--motion-ease) !important;}
.input:focus {outline:0; border-color:#6392f0; box-shadow:0 0 0 3px #2563eb13 !important;}
.search {border-radius:11px;}
.search:focus-within {box-shadow:0 0 0 3px #2563eb0f !important; border-color:#acc4f4;}
.search input:focus {outline:0;}
.form-note, .document-note, .form-error, .f-company-checks {border-radius:12px;}
.form-error:not([hidden]) {animation:motion-note 160ms var(--motion-ease) both !important;}
.status, .badge {border-radius:7px;}
.view-switch {border-radius:11px; padding:3px; background:#f3f5f8; border-color:#e7eaf0;}
.view-switch button.active {background:#fff; box-shadow:0 1px 3px #20212612 !important;}
.segment.active {background:#edf3ff; border-color:#d4e2fc;}
h1, .finance-content h1 {font-size:30px; font-weight:650; letter-spacing:-.7px;}
.panel-heading h2, .context-title h2 {letter-spacing:-.25px;}
.summary-value {font-weight:600; font-variant-numeric:tabular-nums;}
.stock-table tbody tr, .doc-list tbody tr, .f-table tbody tr {transition:background-color 140ms var(--motion-ease) !important;}
.stock-table tbody tr:hover, .doc-list tbody tr:hover, .f-table tbody tr:hover {background:#f6f8fc;}
.site-header {background:#fcfcfe; border-color:#e9ebef; transition:background-color 160ms var(--motion-ease) !important;}
.site-header .brand-mark {border-radius:9px; background:#2563eb;}
.site-header .brand-word {font-weight:650;}
.top-nav-item {font-weight:550; border-radius:11px; padding:10px 16px;}
.top-nav-item.current {background:#eef1f7;}
.top-nav-item:hover, .top-nav-item.expanded {background:#e9edf4;}
.header-tools .profile-button {border-radius:11px; background:#f0f2f6;}
.header-tools .avatar {border-radius:7px;}
.section-bar {background:#fcfcfe; border-color:#e9ebef;}
.section-bar .search {border-radius:10px; background:#f3f5f8; border-color:#eceef3;}
.section-nav {gap:8px; padding:3px 0;}
.section-nav .navigation-link {border:0; padding:9px 12px; border-radius:10px; font-weight:500;}
.section-nav .navigation-link.active {background:#eaf1ff; color:#255fc6; border:0; font-weight:600;}
.section-nav .navigation-link:hover {background:#f0f3f8;}
.navigation-panel {
  top:67px; left:0; right:0; bottom:auto; width:100%; max-height:calc(100dvh - 67px);
  padding:0; overflow:hidden; border:0; border-bottom:1px solid #e6e8ee;
  border-radius:0 0 24px 24px; background:#fcfcfe; z-index:39;
  box-shadow:0 20px 35px #18233d0a !important;
}
.navigation-panel-inner {max-width:1320px; margin:0 auto; padding:28px 40px 38px; max-height:calc(100dvh - 67px); overflow:auto; overscroll-behavior:contain;}
.navigation-panel-heading {margin-bottom:20px; min-height:28px;}
.navigation-panel-heading>strong {font-size:12px; letter-spacing:.02em; color:#7a7d86;}
.navigation-panel-heading .icon-button {width:32px; height:32px; background:#eff1f5; border-radius:50%;}
.navigation-panel-heading .icon-button .icon {width:16px; height:16px;}
.navigation-columns {grid-template-columns:minmax(220px,1.1fr) minmax(220px,1fr) minmax(220px,1fr); gap:44px;}
.navigation-column h3 {font-size:12px; font-weight:450; margin-bottom:12px; padding:0 12px; color:#777d86;}
.navigation-column .navigation-link {padding:9px 12px; border-radius:10px; font-size:15px; line-height:1.4; font-weight:500;}
.navigation-column:first-child .navigation-link {font-size:23px; font-weight:600; letter-spacing:-.55px; padding:7px 12px;}
.navigation-link.active {background:#edf2fc; color:#215ebf;}
.navigation-link:hover {background:#f0f2f7;}
.navigation-action {border-radius:10px; min-height:40px; padding:10px 12px;}
.navigation-scrim, .navigation-scrim:hover {
  background:#e8ebf24d; backdrop-filter:blur(12px) !important; -webkit-backdrop-filter:blur(12px) !important;
  cursor:default; border-radius:0;
}
.navigation-open .site-header {background:#fcfcfe; border-bottom-color:transparent;}
.motion-closing {pointer-events:none;}
.popover, .operation-menu {border-radius:16px; padding:7px; border-color:#e4e7ed; box-shadow:0 14px 40px #16213a18 !important; transform-origin:center;}
.operation-menu {top:calc(100% + 9px);}
dialog.sheet {border-radius:24px; border:1px solid #e9ebef; box-shadow:0 24px 80px #101c3c24 !important;}
dialog.inspector {inset:12px 12px 12px auto; width:440px; height:calc(100dvh - 24px); max-height:calc(100dvh - 24px); border:1px solid #e9ebef; border-radius:24px; box-shadow:0 24px 80px #101c3c24 !important;}
dialog::backdrop {background:#18203938; backdrop-filter:blur(4px) !important; -webkit-backdrop-filter:blur(4px) !important;}
dialog[open]::backdrop {animation:motion-backdrop-in 180ms var(--motion-ease) both !important;}
dialog.closing::backdrop {animation:motion-backdrop-out 120ms var(--motion-ease) both !important;}
.sheet-header {padding:25px 28px 20px; border-color:#eef0f4;}
.sheet-header h2 {font-size:23px; letter-spacing:-.5px; font-weight:600;}
.sheet-header .icon-button {background:#f1f3f7; border-radius:50%;}
.sheet-body {padding:24px 28px;}
.sheet-footer {padding:18px 28px; border-color:#eef0f4; background:#fafbfd;}
.toast {border-radius:15px; padding:13px 18px; background:#252a34; box-shadow:0 8px 28px #15233a20 !important; transition:opacity 160ms var(--motion-ease),transform 180ms var(--motion-ease) !important; transform:translate(-50%,8px) scale(.95);}
.toast.show {transform:translate(-50%,0) scale(1);}
.auth-card.glass {border-radius:24px; border-color:#e5e8ef; box-shadow:0 12px 40px #18233d08 !important; animation:motion-surface-in 200ms var(--motion-ease) both !important;}
.auth-card>.brand-mark {border-radius:12px;}
.spinner {animation:spin 800ms linear infinite !important;}
@keyframes motion-backdrop-in {from{opacity:0}to{opacity:1}}
@keyframes motion-backdrop-out {from{opacity:1}to{opacity:0}}
@keyframes motion-surface-in {from{opacity:0;transform:translateY(6px) scale(.95)}to{opacity:1;transform:none}}
@keyframes motion-note {from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media(min-width:768px) and (max-width:1199px) {
  .top-nav-item {padding:10px 12px;}
  .navigation-panel {left:0; width:100%;}
  .navigation-panel-inner {padding:24px 28px 32px;}
  .navigation-columns {grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px;}
  .navigation-column:first-child .navigation-link {font-size:21px;}
  .section-nav {gap:4px;}
  .section-nav .navigation-link {padding:9px 10px;}
}
@media(max-width:767px) {
  .navigation-panel {inset:59px 0 0; width:100%; max-height:calc(100dvh - 59px); height:calc(100dvh - 59px); border-radius:0;}
  .navigation-panel-inner {padding:18px 20px max(24px,env(safe-area-inset-bottom)); max-height:calc(100dvh - 59px); height:100%;}
  .navigation-panel-heading {margin-bottom:12px;}
  .navigation-panel-heading>strong {font-size:19px; color:#24262d; font-weight:600; letter-spacing:-.3px;}
  .navigation-panel-heading .icon-button {width:36px; height:36px;}
  .mobile-navigation-group {border-color:#e8eaf0; padding:3px 0;}
  .mobile-navigation-group>summary {padding:16px 4px; font-size:18px; letter-spacing:-.25px; border-radius:10px;}
  .mobile-navigation-group>summary>.icon {transition:transform 180ms var(--motion-ease) !important;}
  .mobile-navigation-group[data-motion-closing="true"]>summary>.icon {transform:rotate(0);}
  .mobile-navigation-group .navigation-columns {gap:18px; padding-bottom:18px;}
  .navigation-column:first-child .navigation-link, .navigation-column .navigation-link {font-size:16px; font-weight:500; letter-spacing:0; padding:12px; min-height:44px;}
  .navigation-column h3 {font-size:12px; padding-left:12px;}
  .section-nav {gap:6px; margin:8px 0 10px;}
  .section-nav .navigation-link {padding:10px 12px; min-height:40px; border:0;}
  .section-bar .search {height:40px;}
  h1, .finance-content h1 {font-size:27px; letter-spacing:-.6px;}
  .surface, .summary-card, .inventory-panel, .storage-panel, .activity-panel, .product-card, .f-card, .f-metric, .f-panel, .f-table-panel {border-radius:17px;}
  .summary-card {padding:15px 12px;}
  .summary-label {font-size:11px;}
  .summary-value {font-size:25px;}
  .action-tile {border-radius:13px; min-height:56px; padding:12px;}
  .button, .finance-content .button {border-radius:12px; min-height:44px;}
  dialog.sheet {width:calc(100% - 20px); border-radius:22px;}
  dialog.inspector {inset:10px; width:calc(100% - 20px); max-width:calc(100% - 20px); height:calc(100dvh - 20px); max-height:calc(100dvh - 20px); border-radius:22px;}
  .sheet-header,.sheet-body {padding:20px;}
  .sheet-footer {padding:16px 20px;}
  .sheet-header h2 {font-size:21px;}
  .input, .line-row .input {font-size:16px;}
  .auth-card.glass {border-radius:22px;}
}
@media(prefers-reduced-transparency:reduce) {
  .navigation-scrim, .navigation-scrim:hover {background:#edf0f5d9; backdrop-filter:none !important; -webkit-backdrop-filter:none !important;}
  dialog::backdrop {backdrop-filter:none !important; -webkit-backdrop-filter:none !important;}
}
@media(prefers-reduced-motion:reduce) {
  :root:root:root *, :root:root:root *::before, :root:root:root *::after {animation:none !important; transition:none !important; scroll-behavior:auto !important;}
  button.is-pressed,button:active:not(:disabled),.button.primary:active:not(:disabled),.button.primary.is-pressed,.icon-button.is-pressed,.icon-button:active:not(:disabled),a.navigation-link.is-pressed,a.navigation-link:active,summary.is-pressed,.action-tile:active:not(:disabled),.product-card:active:not(:disabled),.f-card:active:not(:disabled),.action-tile.is-pressed,.product-card.is-pressed,.f-card.is-pressed {transform:none;}
}
