@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root {
  --ocean: #0a84e8;
  --ocean-strong: #056ac0;
  --ocean-soft: #e8f4ff;
  --sun: #ffc928;
  --basalt: #0d1728;
  --basalt-2: #142238;
  --ink: #101828;
  --muted: #64748b;
  --muted-soft: #94a3b8;
  --line: #dfe7f0;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --bg: #edf3f8;
  --success: #12a66a;
  --danger: #e5484d;
  --shadow-sm: 0 3px 12px rgba(15, 23, 42, .05);
  --shadow-md: 0 14px 38px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; }
a { text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
::selection { color: #fff; background: var(--ocean); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: #aebdcc; background-clip: padding-box; }

.app-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 4%, rgba(10,132,232,.09), transparent 25rem),
    radial-gradient(circle at 30% 95%, rgba(255,201,40,.08), transparent 30rem),
    var(--bg);
}
.app-shell { isolation: isolate; }
.page-container { position: relative; z-index: 1; }
.page-container::before {
  position: fixed; inset: 80px 0 auto 272px; z-index: -1; height: 150px;
  background: linear-gradient(180deg, rgba(255,255,255,.52), transparent); content: '';
  pointer-events: none;
}

.login-body { background: #f3f7fb; }
.login-hero {
  background:
    linear-gradient(140deg, rgba(10,132,232,.16), transparent 45%),
    radial-gradient(circle at 15% 90%, rgba(255,201,40,.13), transparent 24rem),
    linear-gradient(160deg, #0a1425 0%, #101e33 58%, #0d1728 100%);
}
.login-proof { border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; background: rgba(255,255,255,.06); padding: 1rem; backdrop-filter: blur(8px); }
.login-proof b { display: block; color: var(--sun); font-size: 1.1rem; }
.login-proof span { display: block; margin-top: .15rem; color: #aebbd0; font-size: .72rem; font-weight: 700; }
.brand-overline { display: block; margin-top: .14rem; color: #74849b; font-size: .57rem; font-weight: 900; letter-spacing: .2em; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60; display: flex; width: 272px;
  transform: translateX(-100%); flex-direction: column;
  background:
    radial-gradient(circle at 10% 0, rgba(10,132,232,.2), transparent 18rem),
    linear-gradient(180deg, #0b1526 0%, #111f34 54%, #0b1526 100%);
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 24px 0 70px rgba(6,13,25,.2); transition: transform .25s ease;
}
.sidebar.open { transform: translateX(0); }
.sidebar-brand { border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-profile { border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.055); box-shadow: inset 0 1px rgba(255,255,255,.04); }
.menu-overlay { position: fixed; inset: 0; z-index: 50; display: none; background: rgba(7,14,27,.62); backdrop-filter: blur(5px); }
.menu-overlay.open { display: block; }
.nav-group { display: flex; align-items: center; gap: .6rem; margin: 1.45rem .9rem .55rem; color: #607087; font-size: .62rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.nav-group::after { height: 1px; flex: 1; background: rgba(255,255,255,.06); content: ''; }
.nav-link { position: relative; display: flex; align-items: center; gap: .82rem; margin: .18rem 0; padding: .72rem .88rem; border: 1px solid transparent; border-radius: .82rem; color: #98a7bc; font-size: .86rem; font-weight: 750; transition: .18s ease; }
.nav-link::before { position: absolute; left: -.3rem; width: 3px; height: 18px; border-radius: 99px; background: transparent; content: ''; }
.nav-link:hover { border-color: rgba(255,255,255,.06); background: rgba(255,255,255,.055); color: #fff; transform: translateX(2px); }
.nav-link.active { border-color: rgba(72,166,240,.28); background: linear-gradient(135deg, rgba(10,132,232,.94), rgba(5,106,192,.92)); color: #fff; box-shadow: 0 10px 26px rgba(2,84,153,.3); }
.nav-link.active::before { background: var(--sun); }
.nav-link svg { opacity: .84; }
.nav-link.active svg { opacity: 1; filter: drop-shadow(0 2px 5px rgba(0,0,0,.18)); }

.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 84px; align-items: center; gap: .9rem; border-bottom: 1px solid rgba(211,222,233,.78); background: rgba(250,252,254,.86); padding: 0 1rem; box-shadow: 0 8px 30px rgba(15,23,42,.035); backdrop-filter: blur(22px) saturate(160%); }
.page-heading-icon { height: 44px; width: 44px; place-items: center; border: 1px solid #d9e8f5; border-radius: .9rem; background: linear-gradient(145deg,#fff,#eaf5fe); color: var(--ocean); box-shadow: var(--shadow-sm); }
.live-pill { align-items: center; gap: .35rem; border: 1px solid #bfead8; border-radius: 99px; background: #edfbf5; padding: .18rem .48rem; color: #16845b; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #17b978; box-shadow: 0 0 0 4px rgba(23,185,120,.12); }
.topbar-date { border-right: 1px solid var(--line); padding-right: 1rem; }
.topbar-date b, .topbar-date small { display: block; }
.topbar-date b { font-size: .78rem; }
.topbar-date small { color: var(--muted-soft); font-size: .63rem; }

.mobile-nav { position: fixed; right: .7rem; bottom: max(.7rem, env(safe-area-inset-bottom)); left: .7rem; z-index: 40; display: flex; justify-content: space-around; border: 1px solid rgba(255,255,255,.1); border-radius: 1.2rem; background: rgba(10,20,36,.95); padding: .48rem; box-shadow: 0 20px 50px rgba(7,14,27,.3); backdrop-filter: blur(18px); transition: opacity .2s ease, transform .2s ease; }
.sidebar-active .mobile-nav { pointer-events: none; opacity: 0; transform: translateY(120%); }
.mobile-nav a { display: flex; min-width: 60px; flex-direction: column; align-items: center; gap: .2rem; border-radius: .78rem; padding: .48rem .5rem; color: #8fa0b7; font-size: .61rem; font-weight: 800; }
.mobile-nav a.active { background: linear-gradient(135deg,var(--ocean),var(--ocean-strong)); color: #fff; box-shadow: 0 7px 18px rgba(10,132,232,.28); }

.panel { border: 1px solid rgba(215,225,235,.9); border-radius: 1.4rem; background: rgba(255,255,255,.97); box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #eaf0f5; padding: 1.3rem 1.5rem; background: linear-gradient(180deg,#fff,#fbfcfe); }
.panel-head h2, .panel-title { margin: 0; color: var(--ink); font-size: 1.02rem; font-weight: 900; letter-spacing: -.015em; }
.panel-head p, .panel-subtitle { margin: .2rem 0 0; color: #8998ab; font-size: .76rem; }
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-4px); border-color: #b9d7ee; box-shadow: var(--shadow-md); }
.stat-card { position: relative; display: flex; min-height: 138px; align-items: flex-start; gap: 1rem; overflow: hidden; border: 1px solid rgba(215,225,235,.9); border-radius: 1.4rem; background: linear-gradient(145deg,#fff 0%,#fbfdff 100%); padding: 1.3rem; box-shadow: var(--shadow-sm); transition: .2s ease; }
.stat-card::after { position: absolute; right: -30px; bottom: -45px; width: 105px; height: 105px; border-radius: 50%; background: rgba(10,132,232,.045); content: ''; }
.stat-card:hover { transform: translateY(-3px); border-color: #bed9ed; box-shadow: var(--shadow-md); }
.stat-icon { display: grid; height: 46px; width: 46px; flex: 0 0 46px; place-items: center; border-radius: .95rem; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.tone-blue { background: linear-gradient(145deg,#e4f3ff,#d7ecfd); color: var(--ocean); }
.tone-yellow { background: linear-gradient(145deg,#fff4bf,#ffe89a); color: #996a00; }
.tone-green { background: linear-gradient(145deg,#dff9ed,#c9f2df); color: #128258; }
.tone-dark { background: linear-gradient(145deg,#e9eef4,#dce4ed); color: var(--basalt); }
.stat-label { color: var(--muted); font-size: .73rem; font-weight: 750; }
.stat-value { margin-top: .24rem; color: var(--ink); font-size: 1.65rem; font-weight: 900; letter-spacing: -.045em; }
.stat-meta { margin-top: .2rem; color: var(--muted-soft); font-size: .69rem; }

.module-launch { display: grid; grid-template-columns: auto 1fr; column-gap: .85rem; align-items: center; border: 1px solid #dfe7ef; border-radius: 1.05rem; padding: 1rem; background: linear-gradient(145deg,#fff,#fbfdff); transition: .2s; }
.module-launch:hover { border-color: #93c9ee; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.module-launch b { color: var(--ink); font-size: .9rem; }
.module-launch small { grid-column: 2; margin-top: -.35rem; color: var(--muted); }

.btn { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: .78rem; padding: .68rem 1rem; font-size: .8rem; font-weight: 850; transition: .18s ease; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-link:focus-visible, .form-field:focus-visible { outline: 3px solid rgba(10,132,232,.22); outline-offset: 2px; }
.btn:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
.btn-primary { background: linear-gradient(135deg,var(--ocean),var(--ocean-strong)); color: #fff; box-shadow: 0 8px 20px rgba(10,132,232,.24), inset 0 1px rgba(255,255,255,.22); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(.97); box-shadow: 0 12px 26px rgba(10,132,232,.3); }
.btn-secondary { border: 1px solid #d8e2eb; background: #fff; color: #46566b; box-shadow: 0 2px 7px rgba(15,23,42,.035); }
.btn-secondary:hover { border-color: #a9c4d9; background: #f8fbfe; color: var(--ocean-strong); transform: translateY(-1px); }
.btn-danger { border: 1px solid #f1c5c8; background: #fff1f2; color: #bd343c; box-shadow: 0 2px 7px rgba(190,52,60,.05); }
.btn-danger:hover { border-color: #e99da3; background: #fee5e7; transform: translateY(-1px); }
.icon-btn { display: inline-grid; height: 42px; width: 42px; flex: 0 0 42px; place-items: center; border: 1px solid #dce5ed; border-radius: .8rem; background: #fff; color: #64748b; box-shadow: 0 2px 8px rgba(15,23,42,.035); transition: .18s; }
.icon-btn:hover { border-color: #b2cee2; color: var(--ocean); background: #f6fbff; transform: translateY(-1px); }
.text-link { display: inline-flex; align-items: center; gap: .3rem; color: var(--ocean-strong); font-size: .75rem; font-weight: 850; }
.text-link:hover { text-decoration: underline; }
.avatar { display: grid; height: 38px; width: 38px; flex: 0 0 38px; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: .82rem; background: linear-gradient(135deg,var(--ocean),#36a7ff); color: #fff; font-size: .8rem; font-weight: 900; box-shadow: 0 7px 18px rgba(0,0,0,.16); }
.avatar-lg { height: 50px; width: 50px; flex-basis: 50px; border-radius: 1rem; font-size: 1rem; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; text-align: left; }
th { border-bottom: 1px solid #e5ebf1; background: #f8fafc; padding: .82rem 1.25rem; color: #7f8da0; font-size: .62rem; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
td { border-top: 1px solid #edf1f5; padding: 1rem 1.25rem; color: #4f6074; font-size: .8rem; }
tbody tr:first-child td { border-top: 0; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #f7fbfe; }
td small { color: #8c9caf; font-size: .67rem; }
.badge { display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 999px; padding: .3rem .58rem; font-size: .63rem; font-weight: 850; white-space: nowrap; }
.badge-blue { border-color: #cde7fb; background: #e8f5ff; color: #0873c8; }
.badge-yellow { border-color: #f3dda1; background: #fff5cf; color: #8b6500; }
.badge-success { border-color: #c4ecd9; background: #e4f8ef; color: #13805a; }
.badge-danger { border-color: #f3cccc; background: #feeeee; color: #be3d43; }
.badge-neutral { border-color: #e0e6ed; background: #f0f3f6; color: #607086; }
.mini-select { max-width: 142px; border: 1px solid #dbe5ee; border-radius: .62rem; background: #fff; padding: .46rem .6rem; color: #506176; font-size: .69rem; outline: none; }
.filter-pill { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid #d8e3ec; border-radius: 999px; background: rgba(255,255,255,.9); padding: .57rem .84rem; color: #607086; font-size: .73rem; font-weight: 850; box-shadow: 0 2px 7px rgba(15,23,42,.025); transition: .16s; }
.filter-pill:hover { border-color: #aac8dd; color: var(--ocean-strong); }
.filter-pill span { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 999px; background: #e9eef3; font-size: .61rem; }
.filter-pill.active { border-color: var(--basalt); background: linear-gradient(135deg,var(--basalt),var(--basalt-2)); color: #fff; box-shadow: 0 8px 20px rgba(13,23,40,.18); }
.filter-pill.active span { background: rgba(255,255,255,.14); }

.form-label { display: block; margin-bottom: .46rem; color: #4b5c71; font-size: .66rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.form-field { width: 100%; min-height: 46px; border: 1px solid #d8e3ed; border-radius: .78rem; background: #fff; padding: .75rem .88rem; color: var(--ink); font-size: .83rem; outline: none; box-shadow: inset 0 1px 2px rgba(15,23,42,.018); transition: .18s; }
.form-field:hover { border-color: #becfdd; }
.form-field:focus, .field-with-icon:focus-within, .input-suffix:focus-within { border-color: var(--ocean); box-shadow: 0 0 0 4px rgba(10,132,232,.1); }
.form-field::placeholder { color: #a2afbe; }
textarea.form-field { line-height: 1.55; resize: vertical; }
.field-with-icon { display: flex; align-items: center; gap: .7rem; border: 1px solid #d8e3ed; border-radius: .82rem; background: #fff; padding: 0 .92rem; color: #8796a9; transition: .18s; }
.field-with-icon input { min-width: 0; flex: 1; border: 0; background: transparent; padding: .88rem 0; outline: none; }
.field-with-icon button { border: 0; background: transparent; color: #8796a9; }
.input-suffix { display: flex; align-items: center; border: 1px solid #d8e3ed; border-radius: .78rem; background: #fff; transition: .18s; }
.input-suffix input { min-width: 0; flex: 1; border: 0; background: transparent; padding: .75rem .88rem; outline: none; }
.input-suffix span { border-left: 1px solid #e5ebf1; padding: 0 .82rem; color: #8998aa; font-size: .7rem; font-weight: 850; }
.section-kicker { color: var(--ocean-strong); font-size: .63rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.section-title { margin-top: .3rem; color: var(--ink); font-size: 1.24rem; font-weight: 900; letter-spacing: -.03em; }

.calculator-layout { display: grid; gap: 1.5rem; }
.calculator-result { min-width: 0; }
.cost-row { display: flex; justify-content: space-between; color: #b4bfd0; }
.cost-row b { color: #fff; }
.dark-field { display: flex; border: 1px solid rgba(255,255,255,.14); border-radius: .68rem; background: rgba(255,255,255,.065); }
.dark-field input { min-width: 0; width: 100%; border: 0; background: transparent; padding: .68rem; color: #fff; outline: none; }
.dark-field span { padding: .68rem; color: #8290a4; }
.calculator-choice-card { position: relative; display: flex; min-height: 420px; flex-direction: column; overflow: hidden; border: 1px solid #d9e4ed; border-radius: 1.5rem; background: linear-gradient(150deg,#fff 0%,#fbfdff 100%); padding: 2rem; color: var(--ink); box-shadow: var(--shadow-sm); transition: .22s; }
.calculator-choice-card::after { position: absolute; right: -70px; top: -70px; width: 180px; height: 180px; border-radius: 50%; background: rgba(10,132,232,.055); content: ''; }
.calculator-choice-card:hover { transform: translateY(-5px); border-color: #91c7ed; box-shadow: var(--shadow-md); }
.calculator-choice-card.featured { border-top: 4px solid var(--ocean); }
.calculator-choice-card h3 { margin-top: 2rem; font-size: 1.55rem; font-weight: 900; letter-spacing: -.035em; }
.calculator-choice-card > p { margin-top: .65rem; color: var(--muted); line-height: 1.65; }
.calculator-choice-card ul { margin: 1.5rem 0 2rem; padding: 0; list-style: none; color: #526174; font-size: .86rem; }
.calculator-choice-card li { position: relative; margin: .65rem 0; padding-left: 1.35rem; }
.calculator-choice-card li::before { position: absolute; left: 0; top: .48rem; height: 7px; width: 7px; border-radius: 2px; background: var(--ocean); content: ''; }
.calculator-choice-card.featured li::before { background: var(--success); }
.choice-icon { display: grid; height: 60px; width: 60px; place-items: center; border-radius: 1.05rem; }
.choice-action { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: var(--ocean-strong); font-size: .87rem; font-weight: 900; }
.format-pill { border: 1px solid #dfe7ee; border-radius: .45rem; background: #edf2f6; padding: .36rem .56rem; color: #46566b; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .66rem; font-weight: 850; }
.upload-zone { display: flex; min-height: 245px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed #b4c7d8; border-radius: 1.25rem; background: linear-gradient(145deg,#f8fbfe,#f2f7fb); padding: 2rem; text-align: center; transition: .2s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--ocean); background: #edf7ff; box-shadow: inset 0 0 0 4px rgba(10,132,232,.045); }
.upload-zone input { position: absolute; height: 1px; width: 1px; overflow: hidden; opacity: 0; }
.upload-icon { display: grid; height: 64px; width: 64px; place-items: center; border: 1px solid #cce7fb; border-radius: 1.1rem; background: linear-gradient(145deg,#e9f6ff,#ddecfa); color: var(--ocean); box-shadow: var(--shadow-sm); }
.upload-zone strong { margin-top: 1rem; font-size: 1rem; }
.upload-zone small { margin-top: .35rem; color: #7f90a4; }
.import-step { display: flex; align-items: center; gap: .65rem; border: 1px solid #e8edf3; border-radius: .82rem; background: #f7f9fc; padding: .8rem; color: #607086; font-size: .7rem; font-weight: 750; }
.import-step b { display: grid; height: 25px; width: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: linear-gradient(135deg,var(--basalt),#263a56); color: #fff; font-size: .64rem; }

.machine-row { display: flex; align-items: center; gap: .75rem; border: 1px solid #e7edf3; border-radius: .9rem; padding: .76rem; background: #fff; }
.machine-dot { height: 10px; width: 10px; flex: 0 0 10px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(148,163,184,.12); }
.status-printing { background: var(--ocean); }.status-available { background: #22c55e; }.status-maintenance { background: var(--sun); }.status-offline { background: #94a3b8; }
.stock-bar { height: 7px; width: 150px; max-width: 100%; overflow: hidden; border-radius: 999px; background: #e7edf3; }
.stock-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--ocean),#4db2fa); }
.stock-bar span.low { background: linear-gradient(90deg,#f0b90b,var(--sun)); }
.empty-state { display: flex; min-height: 320px; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
.empty-icon { display: grid; height: 68px; width: 68px; place-items: center; border: 1px solid #cfe7f8; border-radius: 1.3rem; background: linear-gradient(145deg,#edf8ff,#deeffc); color: var(--ocean); }
.empty-state h3 { margin-top: 1rem; color: var(--ink); font-size: 1rem; font-weight: 900; }
.empty-state p { margin-top: .38rem; max-width: 330px; color: #8797aa; font-size: .79rem; }

.alert { border-radius: .9rem; padding: .9rem 1rem; font-size: .79rem; font-weight: 750; box-shadow: var(--shadow-sm); animation: slideDown .25s ease; }
.alert-success { border: 1px solid #b8e8d1; background: #edfbf5; color: #16764f; }
.alert-error { border: 1px solid #f3c3c5; background: #fff0f1; color: #b6343b; }
.alert-warning { border: 1px solid #f0d997; background: #fff9df; color: #8a6400; }
.alert-info { border: 1px solid #bfddf4; background: #edf7ff; color: #096aa9; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.app-dialog { width: calc(100% - 2rem); max-width: 680px; border: 0; border-radius: 1.45rem; background: transparent; padding: 0; box-shadow: var(--shadow-lg); }
.app-dialog::backdrop { background: rgba(7,14,27,.66); backdrop-filter: blur(7px); }
.dialog-card { overflow: hidden; border: 1px solid rgba(255,255,255,.7); border-radius: 1.45rem; background: #fff; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9eef4; padding: 1.35rem 1.55rem; background: linear-gradient(180deg,#fff,#fbfcfe); }
.dialog-head h2 { margin-top: .15rem; color: var(--ink); font-size: 1.2rem; font-weight: 900; }
.dialog-head button { display: grid; height: 38px; width: 38px; place-items: center; border: 1px solid #e1e8ef; border-radius: .75rem; background: #f3f6f9; color: #607086; }
.dialog-body { max-height: 66vh; overflow-y: auto; padding: 1.55rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .7rem; border-top: 1px solid #e9eef4; background: #f9fbfd; padding: 1rem 1.55rem; }

.gcode-viewer { border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(15,23,42,.04); }

/* Maker-style private model library */
.library-hero { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 1.65rem; background: radial-gradient(circle at 86% 8%,rgba(27,166,255,.32),transparent 22rem),radial-gradient(circle at 12% 100%,rgba(255,201,40,.16),transparent 22rem),linear-gradient(130deg,#081426 0%,#102440 58%,#0a1729 100%); color: #fff; box-shadow: 0 24px 60px rgba(8,20,38,.18); }
.library-hero::after { position: absolute; right: 7%; top: -55%; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025),0 0 0 90px rgba(255,255,255,.018); content: ''; }
.library-hero-grid { position: relative; z-index: 1; display: grid; gap: 2rem; padding: 2.2rem; }
.library-eyebrow { display: inline-flex; align-items: center; gap: .45rem; color: var(--sun); font-size: .64rem; font-weight: 900; letter-spacing: .16em; }
.library-hero h2 { margin-top: .7rem; max-width: 670px; font-size: clamp(2rem,4vw,3.5rem); font-weight: 900; letter-spacing: -.055em; line-height: .98; }
.library-hero p { margin-top: 1rem; max-width: 630px; color: #b5c5d9; font-size: .92rem; line-height: 1.65; }
.library-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.library-upload-btn { background: linear-gradient(135deg,var(--sun),#ffb91d); color: #172033; box-shadow: 0 10px 28px rgba(255,201,40,.2); }
.library-upload-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.library-ghost-btn { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff; }
.library-ghost-btn:hover { background: rgba(255,255,255,.14); }
.library-hero-stats { display: grid; grid-template-columns: repeat(3,1fr); align-self: end; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 1.2rem; background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.library-hero-stats div { padding: 1rem; text-align: center; }
.library-hero-stats div+div { border-left: 1px solid rgba(255,255,255,.09); }
.library-hero-stats b { display: block; font-size: 1.45rem; font-weight: 900; }
.library-hero-stats span { color: #95a8c0; font-size: .63rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.library-explorer { position: relative; z-index: 2; margin-top: 1.25rem; }
.library-search-box { display: flex; min-height: 58px; align-items: center; gap: .85rem; border: 1px solid #d7e1ea; border-radius: 1.05rem; background: rgba(255,255,255,.96); padding: .45rem .5rem .45rem 1.1rem; color: #7e8fa2; box-shadow: var(--shadow-md); }
.library-search-box input { min-width: 0; flex: 1; border: 0; background: transparent; color: var(--ink); font-size: .9rem; outline: 0; }
.library-search-box button { min-height: 43px; border: 0; border-radius: .75rem; background: var(--basalt); padding: 0 1.2rem; color: #fff; font-size: .75rem; font-weight: 850; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .9rem; }
.library-categories { display: flex; gap: .5rem; overflow-x: auto; padding: .15rem 0 .45rem; scrollbar-width: none; }
.library-categories::-webkit-scrollbar { display: none; }
.library-category,.library-favorites { display: inline-flex; min-height: 38px; flex: 0 0 auto; align-items: center; gap: .4rem; border: 1px solid #dce5ed; border-radius: 999px; background: rgba(255,255,255,.86); padding: .5rem .75rem; color: #66768a; font-size: .7rem; font-weight: 800; transition: .16s; }
.library-category span { display: grid; min-width: 20px; height: 20px; place-items: center; border-radius: 99px; background: #eef2f6; font-size: .58rem; }
.library-category:hover,.library-favorites:hover { border-color: #a9cbe2; color: var(--ocean-strong); }
.library-category.active { border-color: #152338; background: #152338; color: #fff; box-shadow: 0 7px 18px rgba(15,23,42,.16); }
.library-category.active span { background: rgba(255,255,255,.13); }
.library-favorites.active { border-color: #f2b6bc; background: #fff0f2; color: #d33f4a; }
.library-results-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 1.7rem 0 .9rem; }
.library-results-head h3 { color: var(--ink); font-size: 1.25rem; font-weight: 900; letter-spacing: -.025em; }
.library-results-head p { margin-top: .15rem; color: #8a99aa; font-size: .7rem; }
.library-results-head>span { display: flex; align-items: center; gap: .4rem; color: #7c8b9d; font-size: .68rem; font-weight: 750; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(255px,1fr)); gap: 1rem; }
.library-empty { grid-column: 1/-1; }
.library-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #dce5ed; border-radius: 1.15rem; background: #fff; box-shadow: 0 3px 13px rgba(15,23,42,.045); transition: transform .2s,box-shadow .2s,border-color .2s; }
.library-card:hover { transform: translateY(-5px); border-color: #b9d3e5; box-shadow: 0 18px 38px rgba(15,23,42,.1); }
.library-card-cover { position: relative; display: flex; aspect-ratio: 4/3; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(145deg,#e9f0f6,#f7f9fb); }
.library-card-cover::after { position: absolute; inset: auto 0 0; height: 42%; background: linear-gradient(transparent,rgba(9,18,32,.48)); content: ''; pointer-events: none; }
.library-card-cover img { height: 100%; width: 100%; object-fit: cover; transition: transform .35s ease; }
.library-card:hover .library-card-cover img { transform: scale(1.045); }
.library-model-fallback { display: flex; flex-direction: column; align-items: center; gap: .65rem; color: #91a3b8; }
.library-model-fallback b { font-size: .65rem; letter-spacing: .14em; }
.library-card-category,.library-card-gallery { position: absolute; z-index: 2; bottom: .7rem; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; background: rgba(10,20,36,.76); padding: .32rem .58rem; color: #fff; font-size: .58rem; font-weight: 850; backdrop-filter: blur(8px); }
.library-card-category { left: .7rem; }.library-card-gallery { right: .7rem; display: flex; align-items: center; gap: .3rem; }
.library-card-favorite { position: absolute; z-index: 3; right: .65rem; top: .65rem; }
.library-card-favorite button { display: grid; height: 34px; width: 34px; place-items: center; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(255,255,255,.9); color: #8c9bad; box-shadow: 0 5px 14px rgba(15,23,42,.14); backdrop-filter: blur(8px); }
.library-card-favorite button.active { color: #e34250; }
.library-card-body { padding: .95rem 1rem 1rem; }
.library-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; }
.library-card-title h3 { color: var(--ink); font-size: .92rem; font-weight: 900; line-height: 1.25; }
.library-card-title>span { border-radius: .4rem; background: #edf2f6; padding: .25rem .38rem; color: #64748b; font-size: .53rem; font-weight: 900; }
.library-card-body>p { min-height: 35px; margin-top: .5rem; color: #7d8c9e; font-size: .7rem; line-height: 1.5; }
.library-card-meta { display: flex; align-items: center; gap: .42rem; margin-top: .8rem; color: #91a0b1; font-size: .61rem; }
.library-card-meta b { min-width: 0; flex: 1; overflow: hidden; color: #5e6e82; text-overflow: ellipsis; white-space: nowrap; }
.library-card-meta>span:not(.library-author) { display: inline-flex; align-items: center; gap: .2rem; }
.library-author { display: grid; height: 23px; width: 23px; place-items: center; border-radius: 50%; background: linear-gradient(135deg,var(--ocean),#4bb1fb); color: #fff; font-size: .58rem; font-weight: 900; }
.library-dialog { max-width: 830px; }
.library-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.library-form-grid .full { grid-column: 1/-1; }
.library-form-grid small { display: block; margin-top: .35rem; color: #8b9aac; font-size: .65rem; }
.library-image-picker { position: relative; display: grid; min-height: 125px; place-items: center; overflow: hidden; border: 2px dashed #bed1e1; border-radius: 1rem; background: #f5f9fc; color: #7d90a5; text-align: center; transition: .18s; }
.library-image-picker:hover { border-color: var(--ocean); background: #eff8ff; color: var(--ocean); }
.library-image-picker input { position: absolute; inset: 0; width: 100%; cursor: pointer; opacity: 0; }
.library-image-picker div { display: flex; flex-direction: column; align-items: center; gap: .25rem; pointer-events: none; }
.library-image-picker b { color: #41546a; font-size: .78rem; }.library-image-picker span { font-size: .62rem; }
.library-image-preview { display: grid; grid-template-columns: repeat(auto-fill,minmax(76px,1fr)); gap: .5rem; margin-top: .55rem; }
.library-image-preview div { overflow: hidden; aspect-ratio: 1; border: 1px solid #dce5ed; border-radius: .65rem; background: #eef2f6; }
.library-image-preview img { height: 100%; width: 100%; object-fit: cover; }

/* 3MF geometry viewer: used by the calculator and automatic library covers. */
.three-mf-viewer { position: relative; min-height: 320px; overflow: hidden; background: #f8fafc; }
.three-mf-viewer canvas { display: block; width: 100%; height: 100%; min-height: inherit; cursor: grab; }
.three-mf-viewer canvas:active { cursor: grabbing; }
.three-mf-loading,.three-mf-error { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .45rem; padding: 2rem; color: #64748b; text-align: center; }
.three-mf-loading span { width: 34px; height: 34px; border: 3px solid #dbeafe; border-top-color: #0877d1; border-radius: 999px; animation: spin .8s linear infinite; }
.three-mf-loading b,.three-mf-error b { color: #1e293b; font-size: .9rem; }
.three-mf-loading small,.three-mf-error small { max-width: 32rem; font-size: .72rem; line-height: 1.5; }
.three-mf-toolbar { position: absolute; z-index: 4; top: .65rem; left: .65rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.three-mf-toolbar button { border: 1px solid rgba(255,255,255,.16); border-radius: .5rem; background: rgba(15,23,42,.86); padding: .38rem .55rem; color: white; box-shadow: 0 5px 16px rgba(15,23,42,.18); font: 800 .58rem/1 Inter,system-ui,sans-serif; cursor: pointer; backdrop-filter: blur(8px); }
.three-mf-toolbar button:hover { background: #0877d1; }
.three-mf-badge { position: absolute; z-index: 3; right: .65rem; bottom: .65rem; border-radius: .55rem; background: rgba(15,23,42,.84); padding: .45rem .65rem; color: #fff; font-size: .62rem; font-weight: 800; backdrop-filter: blur(8px); }
.model-stat { min-width: 0; border: 1px solid #e2e8f0; border-radius: .85rem; background: #f8fafc; padding: .8rem; }
.model-stat span { display: block; color: #64748b; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.model-stat b { display: block; margin-top: .25rem; overflow-wrap: anywhere; color: #0f172a; font-size: .78rem; }
.library-3mf-preview { overflow: hidden; border: 1px solid #dbe3ec; border-radius: 1rem; background: #f8fafc; }
.library-3mf-preview[hidden] { display: none; }
.library-3mf-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e2e8f0; padding: .85rem 1rem; }
.library-3mf-preview-head .form-label { margin: 0; }
.library-3mf-preview-head small { display: block; margin-top: .2rem; color: #64748b; font-size: .68rem; }
.library-3mf-preview .three-mf-viewer { min-height: 300px; }
@keyframes spin { to { transform: rotate(360deg); } }
.library-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.library-field-heading .form-label { margin: 0; }
.library-field-heading button { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: transparent; color: var(--ocean-strong); font-size: .68rem; font-weight: 850; }
.library-link-list { display: grid; gap: .55rem; margin-top: .5rem; }
.library-link-row { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(180px,1.3fr) 38px; gap: .5rem; align-items: center; }
.library-link-row button { display: grid; height: 38px; width: 38px; place-items: center; border: 1px solid #e5cfd2; border-radius: .7rem; background: #fff5f6; color: #d34952; }
.library-detail-breadcrumb { display: flex; align-items: center; gap: .55rem; margin-bottom: 1rem; color: #8a99aa; font-size: .72rem; font-weight: 750; }
.library-detail-breadcrumb a { display: flex; align-items: center; gap: .4rem; color: var(--ocean-strong); }
.library-detail { display: grid; gap: 1.5rem; }
.library-gallery-main { display: flex; aspect-ratio: 4/3; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #d9e3eb; border-radius: 1.35rem; background: linear-gradient(145deg,#eaf0f5,#fafcfd); box-shadow: var(--shadow-sm); }
.library-gallery-main img { height: 100%; width: 100%; object-fit: contain; background: #f5f7f9; }
.library-thumbs { display: grid; grid-template-columns: repeat(auto-fill,minmax(75px,1fr)); gap: .65rem; margin-top: .7rem; }
.library-thumbs button { overflow: hidden; aspect-ratio: 1; border: 2px solid transparent; border-radius: .75rem; background: #fff; padding: 3px; box-shadow: var(--shadow-sm); }
.library-thumbs button.active { border-color: var(--ocean); box-shadow: 0 0 0 3px rgba(10,132,232,.1); }
.library-thumbs img { height: 100%; width: 100%; border-radius: .55rem; object-fit: cover; }
.library-detail-info { align-self: start; border: 1px solid #dae4ec; border-radius: 1.35rem; background: #fff; padding: 1.5rem; box-shadow: var(--shadow-md); }
.library-detail-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.library-detail-badges span { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #dce7ef; border-radius: 99px; background: #f2f6f9; padding: .32rem .56rem; color: #607186; font-size: .58rem; font-weight: 850; }
.library-detail-badges span.private { border-color: #f1d79a; background: #fff8dd; color: #886400; }
.library-detail-info>h2 { margin-top: .9rem; color: var(--ink); font-size: 2rem; font-weight: 900; letter-spacing: -.045em; line-height: 1.05; }
.library-creator { display: flex; align-items: center; gap: .65rem; margin-top: 1rem; }
.library-creator>span { display: grid; height: 38px; width: 38px; place-items: center; border-radius: 50%; background: linear-gradient(135deg,var(--ocean),#49b0fc); color: #fff; font-weight: 900; }
.library-creator b,.library-creator small { display: block; }.library-creator b { color: #44566b; font-size: .75rem; }.library-creator small { margin-top: .12rem; color: #94a2b2; font-size: .62rem; }
.library-detail-description { margin-top: 1.2rem; color: #607186; font-size: .8rem; line-height: 1.7; }
.library-detail-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.library-detail-tags span { border-radius: 99px; background: #eaf5fe; padding: .35rem .6rem; color: #0873c8; font-size: .62rem; font-weight: 800; }
.library-download-panel { display: flex; gap: .6rem; margin-top: 1.2rem; }.library-download-panel>a { flex: 1; }
.library-detail-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-top: 1rem; border-top: 1px solid #e7edf2; padding-top: 1rem; }
.library-detail-facts div { min-width: 0; border-radius: .7rem; background: #f7f9fb; padding: .65rem; }.library-detail-facts span,.library-detail-facts b { display: block; }.library-detail-facts span { color: #94a1b0; font-size: .57rem; font-weight: 800; text-transform: uppercase; }.library-detail-facts b { margin-top: .2rem; overflow: hidden; color: #4d5e72; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.library-external-links { margin-top: 1.1rem; }.library-external-links h3 { display: flex; align-items: center; gap: .4rem; color: #33465b; font-size: .75rem; font-weight: 900; }.library-external-links a { display: flex; align-items: center; justify-content: space-between; margin-top: .5rem; border: 1px solid #dfe7ee; border-radius: .75rem; padding: .7rem .8rem; color: #52657a; font-size: .7rem; font-weight: 800; transition: .15s; }.library-external-links a span { display: flex; align-items: center; gap: .45rem; }.library-external-links a:hover { border-color: #acd1ea; background: #f1f9ff; color: var(--ocean-strong); }
.library-edit-button { width: 100%; margin-top: 1rem; }
.library-manage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }.library-manage-head h2 { margin-top: .2rem; color: var(--ink); font-size: 1.6rem; font-weight: 900; }.library-manage-head p:not(.section-kicker) { margin-top: .3rem; color: #8493a5; font-size: .75rem; }
.library-manage-grid { display: grid; gap: 1rem; }.library-manage-panel { padding: 1.2rem; }.library-manage-title { display: flex; align-items: center; justify-content: space-between; }.library-manage-title>div { display: flex; align-items: center; gap: .55rem; }.library-manage-title span { display: grid; height: 36px; width: 36px; place-items: center; border-radius: .7rem; background: #e9f5fe; color: var(--ocean); }.library-manage-title h3 { font-size: .95rem; font-weight: 900; }.library-manage-title>b { display: grid; min-width: 28px; height: 28px; place-items: center; border-radius: 99px; background: #edf2f6; color: #64748b; font-size: .65rem; }
.library-category-create { display: flex; gap: .5rem; margin-top: 1rem; }.library-category-editor { display: grid; gap: .45rem; margin-top: .8rem; }.library-category-editor>div,.library-category-editor form { display: flex; gap: .4rem; }.library-category-editor>div>form:first-child { min-width: 0; flex: 1; }.library-category-editor input { min-width: 0; }
.library-model-list { display: grid; gap: .35rem; margin-top: .8rem; }.library-model-list>div { display: flex; align-items: center; gap: .7rem; border-top: 1px solid #edf1f4; padding: .65rem 0; }.library-model-list>div:first-child { border-top: 0; }.library-model-list img,.library-model-list>div>span { display: grid; height: 45px; width: 52px; flex: 0 0 52px; place-items: center; border-radius: .55rem; background: #edf2f6; color: #8797a9; object-fit: cover; }.library-model-list>div>div { min-width: 0; flex: 1; }.library-model-list b,.library-model-list small { display: block; }.library-model-list b { overflow: hidden; color: #35475c; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }.library-model-list small { margin-top: .18rem; color: #91a0b1; font-size: .62rem; }.library-list-empty { padding: 2rem; text-align: center; color: #8c9bad; font-size: .75rem; }
.library-editor { margin-top: 1rem; padding: 1.35rem; }.library-editor-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f4; padding-bottom: 1rem; margin-bottom: 1rem; }.library-editor-head h3 { margin-top: .2rem; font-size: 1.15rem; font-weight: 900; }.library-current-images { display: grid; grid-template-columns: repeat(auto-fill,minmax(110px,1fr)); gap: .65rem; margin-top: .55rem; }.library-current-images label { overflow: hidden; border: 1px solid #dce5ed; border-radius: .75rem; background: #fff; }.library-current-images img { width: 100%; aspect-ratio: 1; object-fit: cover; }.library-current-images span { display: flex; align-items: center; gap: .35rem; padding: .5rem; color: #a43d44; font-size: .62rem; font-weight: 800; }.library-muted-box { margin-top: .5rem; border-radius: .75rem; background: #f5f8fa; padding: 1rem; color: #8b9aac; font-size: .72rem; }.library-editor-actions { display: flex; justify-content: flex-end; gap: .65rem; border-top: 1px solid #e8edf2; margin-top: 1rem; padding-top: 1rem; }

@media (min-width: 900px) { .library-hero-grid { grid-template-columns: 1fr 330px; align-items: center; }.library-detail { grid-template-columns: minmax(0,1.35fr) minmax(330px,.65fr); }.library-detail-info { position: sticky; top: 104px; }.library-manage-grid { grid-template-columns: minmax(300px,.72fr) minmax(420px,1.28fr); } }

@media (min-width: 640px) { .topbar { padding: 0 1.5rem; } }
@media (min-width: 1024px) {
  .sidebar { position: sticky; top: 0; height: 100vh; transform: none; }
  .topbar { padding: 0 2rem; }
  .calculator-layout { grid-template-columns: minmax(0,1fr) 360px; }
  .mobile-nav { display: none; }
}
@media (min-width: 1280px) { .calculator-layout { grid-template-columns: minmax(0,1fr) 400px; } }
@media (max-width: 1023px) { .page-container::before { left: 0; }.sidebar { width: 284px; } }
@media (max-width: 639px) {
  .topbar > .btn { display: none; }
  .panel { border-radius: 1.12rem; }
  .stat-card { min-height: 120px; padding: 1.05rem; }
  .panel-head { padding: 1rem; }
  .topbar { min-height: 70px; }
  th, td { padding: .88rem 1rem; }
  .app-dialog { width: calc(100% - 1rem); }
  .dialog-body { padding: 1.15rem; }
  .dialog-actions { position: sticky; bottom: 0; }
  .calculator-choice-card { min-height: 360px; padding: 1.35rem; }
  .table-wrap:has(.responsive-table) { overflow: visible; padding: .7rem; }
  table.responsive-table { min-width: 0; border-collapse: separate; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: grid; gap: .75rem; }
  .responsive-table tr { display: grid; overflow: hidden; border: 1px solid #e0e8ef; border-radius: .95rem; background: #fff; box-shadow: 0 3px 10px rgba(15,23,42,.035); }
  .responsive-table td { display: flex; min-height: 43px; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid #edf1f5; padding: .7rem .85rem; text-align: right !important; }
  .responsive-table td:first-child { border-top: 0; background: #f8fafc; }
  .responsive-table td::before { flex: 0 0 auto; color: #8998aa; content: attr(data-label); font-size: .61rem; font-weight: 900; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
  .responsive-table td:empty { display: none; }
  .library-hero-grid { padding: 1.45rem; }
  .library-hero h2 { font-size: 2rem; }
  .library-hero-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .library-hero-stats div { padding: .75rem .35rem; }
  .library-hero-stats b { font-size: 1.05rem; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .library-favorites { align-self: flex-start; }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
  .library-card { border-radius: .9rem; }
  .library-card-body { padding: .72rem; }
  .library-card-title h3 { font-size: .76rem; }
  .library-card-body>p { display: none; }
  .library-card-meta { margin-top: .55rem; }
  .library-card-meta>span:not(.library-author) { display: none; }
  .library-card-category { max-width: calc(100% - 1.2rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .library-search-box button { padding: 0 .8rem; }
  .library-form-grid { grid-template-columns: 1fr; }
  .library-form-grid .full { grid-column: auto; }
  .library-link-row { grid-template-columns: 1fr 38px; }
  .library-link-row input:first-child { grid-column: 1/-1; }
  .library-detail-info { padding: 1.15rem; }
  .library-detail-info>h2 { font-size: 1.65rem; }
  .library-manage-head { align-items: stretch; flex-direction: column; }
  .library-category-create { align-items: stretch; flex-direction: column; }
  .library-model-list .btn { min-height: 36px; padding: .5rem .65rem; font-size: 0; }
  .library-model-list .btn svg { margin: 0; }
  .library-editor { padding: 1rem; }
  .library-editor-actions { align-items: stretch; flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
@media print {
  #sidebar, #menu-overlay, [data-open-menu], .topbar, .mobile-nav, button, .btn { display: none !important; }
  body, .app-shell, main { background: #fff !important; color: #111827 !important; }
  main { margin: 0 !important; padding: 0 !important; width: 100% !important; }
  .page-container { max-width: none !important; padding: 0 !important; }
  .panel, section, article, aside { box-shadow: none !important; break-inside: avoid; }
  .gcode-viewer canvas { max-height: 320px !important; }
}
