/* GasShop — "flame & steel" theme. Tokens first, then components, then motion. */

:root {
  --gs-flame: #f97316;
  --gs-flame-2: #ea580c;
  --gs-ember: #dc2626;
  --gs-amber: #fbbf24;
  --gs-water: #0ea5e9;
  --gs-steel: #64748b;
  --gs-green: #16a34a;
  --gs-violet: #7c3aed;
  --gs-grad: linear-gradient(120deg, #fb923c 0%, #ea580c 55%, #dc2626 100%);
  --gs-bg: #fff8f1;
  --gs-surface: #ffffff;
  --gs-surface-2: #fff4e8;
  --gs-line: rgba(15, 23, 42, .08);
  --gs-ink: #1e293b;
  --gs-muted: #64748b;
  --gs-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(234, 88, 12, .18);
  --gs-shadow-lift: 0 2px 4px rgba(15, 23, 42, .06), 0 18px 36px -14px rgba(234, 88, 12, .28);
  --gs-radius: 18px;
  --bs-primary: #ea580c;
  --bs-primary-rgb: 234, 88, 12;
  --bs-link-color: #ea580c;
  --bs-link-color-rgb: 234, 88, 12;
  --bs-font-sans-serif: 'Inter Variable', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 16px;
}

[data-bs-theme="dark"] {
  --gs-bg: #0b1120;
  --gs-surface: #111a2e;
  --gs-surface-2: #17213a;
  --gs-line: rgba(148, 163, 184, .14);
  --gs-ink: #e2e8f0;
  --gs-muted: #94a3b8;
  --gs-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .6);
  --gs-shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px -14px rgba(249, 115, 22, .25);
  --bs-primary: #fb923c;
  --bs-primary-rgb: 251, 146, 60;
  --bs-link-color: #fb923c;
  --bs-link-color-rgb: 251, 146, 60;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--bs-font-sans-serif);
  background: var(--gs-bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(249, 115, 22, .12), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(14, 165, 233, .09), transparent 60%);
  background-attachment: fixed;
  color: var(--gs-ink);
  min-height: 100vh;
  overflow-x: hidden;
}
h1, h2, h3, h4, h5 { letter-spacing: -.01em; }
.min-w-0 { min-width: 0; }
.text-flame { color: var(--gs-flame-2); }
.text-body-secondary { color: var(--gs-muted) !important; }
a { color: var(--bs-link-color); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--gs-grad); color: #fff;
}
#splash .splash-logo img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 18px 40px -10px rgba(0,0,0,.35); animation: pop .7s cubic-bezier(.2,.9,.3,1.3) both; }
#splash .splash-name { font-weight: 800; font-size: 1.4rem; letter-spacing: .02em; animation: rise .6s .15s both; }
.splash-bar { width: 140px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); margin-top: 22px; overflow: hidden; position: relative; }
.splash-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: #fff; border-radius: 4px; animation: slide 1.1s ease-in-out infinite; }
#splash.is-hidden { opacity: 0; transition: opacity .3s; }
#splash-error { color: #fff !important; }

/* ---------- Login ---------- */
#view-login { min-height: 100vh; }
.auth { position: relative; min-height: 100vh; overflow: hidden; }
.auth-bg { position: absolute; inset: 0; z-index: 0; background: linear-gradient(135deg, #1c0a03 0%, #3b1305 45%, #0f172a 100%); }
.auth-bg .blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 14s ease-in-out infinite alternate; }
.auth-bg .b1 { width: 420px; height: 420px; background: #f97316; top: -120px; left: -80px; }
.auth-bg .b2 { width: 360px; height: 360px; background: #dc2626; bottom: -140px; right: -60px; animation-delay: -4s; }
.auth-bg .b3 { width: 260px; height: 260px; background: #0ea5e9; top: 40%; left: 55%; opacity: .3; animation-delay: -8s; }
.grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%); }
.embers { position: absolute; inset: 0; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; background: #fdba74; box-shadow: 0 0 10px 3px rgba(251,146,60,.6); animation: ember 9s linear infinite; }
.embers i:nth-child(1) { left: 12%; animation-delay: 0s; }
.embers i:nth-child(2) { left: 30%; animation-delay: -3s; width: 4px; height: 4px; }
.embers i:nth-child(3) { left: 52%; animation-delay: -6s; }
.embers i:nth-child(4) { left: 71%; animation-delay: -1.5s; width: 5px; height: 5px; }
.embers i:nth-child(5) { left: 86%; animation-delay: -4.5s; }
.embers i:nth-child(6) { left: 4%; animation-delay: -7.5s; width: 3px; height: 3px; }
.auth-inner { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1fr; align-items: center; gap: 24px; padding: 28px 16px; max-width: 1180px; margin: 0 auto; }
.auth-hero { color: #fff; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.12); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.brand-mark img { width: 40px; height: 40px; border-radius: 10px; }
.brand-row .name { font-weight: 800; font-size: 1.15rem; }
.brand-row .tag { color: rgba(255,255,255,.7); font-size: .85rem; }
.auth-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 800; line-height: 1.1; margin: 22px 0 12px; animation: rise .7s .1s both; }
.auth-hero .grad { background: linear-gradient(90deg, #fdba74, #fbbf24 50%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead-sm { color: rgba(255,255,255,.8); max-width: 560px; animation: rise .7s .2s both; }
.feature-chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; animation: rise .7s .3s both; }
.feature-chips li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 12px; font-size: .85rem; color: #fff; backdrop-filter: blur(6px); }
.feature-chips i { margin-right: 6px; color: #fdba74; }
.hero-art { margin-top: 18px; max-width: 520px; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.hero-art .float-a { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .float-b { animation: float 7s ease-in-out infinite reverse; transform-box: fill-box; transform-origin: center; }
.hero-art .coin { animation: spin 9s linear infinite; transform-box: fill-box; transform-origin: center; }
.hero-art .hero-liquid { animation: rise-liquid 5s ease-in-out infinite alternate; }
.hero-art .hero-wave { animation: wave 3s linear infinite; }
.hero-art .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 1.4s ease-in-out infinite; }
.hero-art .flame-2 { animation-duration: .9s; animation-delay: -.3s; }

.auth-card {
  position: relative; background: rgba(255,255,255,.96); color: #1e293b; border-radius: 26px; padding: 30px 26px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.4) inset; animation: rise .7s .15s both;
}
.auth-card h2 { font-weight: 800; font-size: 1.6rem; margin: 0; }
.auth-card .sub { color: #64748b; margin: 4px 0 20px; }
.auth-note { color: #94a3b8; margin-top: 8px; }
.field { position: relative; margin-bottom: 16px; }
.field input { width: 100%; height: 56px; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 22px 46px 8px 44px; font-size: 1rem; background: #fff; transition: border-color .2s, box-shadow .2s; }
.field input:focus { outline: none; border-color: #f97316; box-shadow: 0 0 0 4px rgba(249,115,22,.18); }
.field label { position: absolute; left: 44px; top: 17px; color: #94a3b8; pointer-events: none; transition: all .18s ease; }
.field input:focus ~ label, .field input:not(:placeholder-shown) ~ label { top: 7px; font-size: .72rem; color: #ea580c; font-weight: 600; }
.lead-icon { position: absolute; left: 16px; top: 19px; color: #94a3b8; font-size: 1.05rem; transition: color .2s; }
.field input:focus ~ .lead-icon { color: #ea580c; }
.field-action { position: absolute; right: 6px; top: 8px; color: #64748b; }
.btn-grad { background: var(--gs-grad); color: #fff; border: 0; font-weight: 700; box-shadow: 0 10px 24px -8px rgba(234,88,12,.6); transition: transform .15s, box-shadow .2s, filter .2s; }
.btn-grad:hover, .btn-grad:focus { color: #fff; filter: brightness(1.06); box-shadow: 0 14px 30px -8px rgba(234,88,12,.7); transform: translateY(-1px); }
.btn-grad:active { transform: translateY(0) scale(.99); }
.btn-grad:disabled { opacity: .6; transform: none; }
.btn-login { height: 54px; font-size: 1.05rem; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-login i { transition: transform .25s; }
.btn-login:hover i { transform: translateX(4px); }
.auth-foot { margin-top: 12px; text-align: center; font-size: .85rem; color: #64748b; }
.auth-card.shake { animation: shake .45s; }
.btn-attention { animation: attention 1.2s ease-in-out 3; }
.link-login-hint { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: .95rem; }

@media (min-width: 992px) {
  .auth-inner { grid-template-columns: 1.15fr .85fr; padding: 48px 40px; }
  .auth-card { justify-self: end; width: 100%; max-width: 420px; }
}

/* ---------- App shell ---------- */
#view-app { min-height: 100vh; }
#sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 248px; z-index: 1030;
  background: #1c0a03; color: #fed7aa; padding: 18px 12px; overflow: hidden;
}
#sidebar::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: radial-gradient(160px 120px at 50% 100%, rgba(249,115,22,.35), transparent); pointer-events: none; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; padding: 6px 8px 18px; font-size: 1.05rem; }
.sidebar-brand .logo img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 16px -4px rgba(249,115,22,.6); }
.nav-section { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(254,215,170,.55); padding: 14px 12px 6px; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #fed7aa; text-decoration: none; font-weight: 500; position: relative; transition: background .2s, color .2s, transform .2s; }
.nav-link i { font-size: 1.1rem; width: 22px; text-align: center; transition: transform .25s; }
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link:hover i { transform: translateX(2px) scale(1.08); }
.nav-link.active { background: linear-gradient(90deg, rgba(249,115,22,.9), rgba(220,38,38,.75)); color: #fff; box-shadow: 0 8px 20px -10px rgba(249,115,22,.9); }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: #fdba74; }
.app-main { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: color-mix(in srgb, var(--gs-bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--gs-line);
  font-size: 1.05rem;
}
#topbar-title { font-weight: 800; }
.avatar-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gs-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 14px -6px rgba(234,88,12,.7); }
.conn-online { background: #dcfce7 !important; color: #166534 !important; }
.conn-offline { background: #fee2e2 !important; color: #991b1b !important; }
[data-bs-theme="dark"] .conn-online { background: rgba(22,163,74,.18) !important; color: #86efac !important; }
[data-bs-theme="dark"] .conn-offline { background: rgba(220,38,38,.2) !important; color: #fca5a5 !important; }
#content { flex: 1; padding: 16px 16px 110px; max-width: 1280px; width: 100%; margin: 0 auto; }
#content.page-enter { animation: page-in .35s cubic-bezier(.2,.8,.2,1) both; }
#content:focus { outline: none; }
@media (min-width: 992px) {
  #sidebar { display: flex !important; }
  .app-main { margin-left: 248px; }
  #content { padding: 24px 28px 40px; }
  #bottom-nav { display: none !important; }
}

#bottom-nav {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 1025;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; gap: 2px; padding: 6px 6px;
  background: color-mix(in srgb, var(--gs-surface) 92%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--gs-line);
  border-radius: 22px; box-shadow: 0 14px 36px -12px rgba(15,23,42,.35);
}
#bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--gs-muted); text-decoration: none; font-size: .68rem; font-weight: 600; padding: 6px 0; border-radius: 14px; transition: color .2s, transform .2s; }
#bottom-nav a i { font-size: 1.25rem; transition: transform .25s; }
#bottom-nav a.active { color: var(--gs-flame-2); }
#bottom-nav a.active i { transform: translateY(-2px) scale(1.1); }
#bottom-nav .nav-sell { position: relative; }
#bottom-nav .nav-sell i { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--gs-grad); color: #fff; font-size: 1.5rem; margin-top: -30px; box-shadow: 0 12px 26px -8px rgba(234,88,12,.85); animation: pulse 2.4s ease-out infinite; }
#bottom-nav .nav-sell.active i { transform: translateY(-2px) scale(1.04); }
#bottom-nav .nav-sell span { margin-top: -2px; }

/* ---------- Generic components ---------- */
.card-lift {
  background: var(--gs-surface); border: 1px solid var(--gs-line); border-radius: var(--gs-radius); box-shadow: var(--gs-shadow);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, border-color .25s;
}
.card-lift:hover { transform: translateY(-2px); box-shadow: var(--gs-shadow-lift); }
button.card-lift, a.card-lift { text-align: left; color: inherit; text-decoration: none; }
.page-header { position: sticky; top: 56px; z-index: 5; padding: 6px 0 4px; background: color-mix(in srgb, var(--gs-bg) 88%, transparent); backdrop-filter: blur(8px); margin-bottom: 4px; }
.page-header h1 { font-weight: 800; }
@media (min-width: 992px) { .page-header { top: 0; } }
.section-title { display: flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--gs-muted); margin: 18px 2px 10px; }
.section-title i { color: var(--gs-flame-2); font-size: .95rem; }
.section-title .ms-auto { text-transform: none; letter-spacing: 0; }
.summary-strip { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.search-box { position: relative; }
.search-box > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gs-muted); pointer-events: none; }
.search-box .form-control { padding-left: 40px; height: 46px; border-radius: 14px; border-color: var(--gs-line); background: var(--gs-surface); box-shadow: var(--gs-shadow); }
.search-box .form-control:focus { border-color: var(--gs-flame); box-shadow: 0 0 0 4px rgba(249,115,22,.15); }
.list-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--gs-line); color: inherit; text-decoration: none;
  background: transparent; width: 100%; text-align: left; transition: background .2s, transform .2s;
}
.list-row:last-child { border-bottom: 0; }
.list-row:hover, .list-row:focus-visible { background: color-mix(in srgb, var(--gs-flame) 7%, transparent); }
.list-row.is-void { opacity: .55; }
.list-row.is-void .fw-bold, .list-row.is-void .fw-semibold { text-decoration: line-through; }
.list-row-static { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--gs-line); }
.list-row-static:last-child { border-bottom: 0; }
.bill-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 40px; background: color-mix(in srgb, var(--gs-flame) 14%, transparent); color: var(--gs-flame-2); font-size: 1.05rem; }
.bill-ico.tone-green { background: rgba(22,163,74,.13); color: #15803d; }
.bill-ico.tone-blue { background: rgba(14,165,233,.14); color: #0369a1; }
.bill-ico.tone-violet { background: rgba(124,58,237,.13); color: #6d28d9; }
.kpi { padding: 14px 14px 12px; height: 100%; }
.kpi-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; margin-bottom: 10px; }
.kpi-value { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; margin: 2px 0; }
@media (min-width: 768px) { .kpi-value { font-size: 1.45rem; } }
.tone-flame { background: rgba(249,115,22,.14); color: #c2410c; }
.tone-blue { background: rgba(14,165,233,.14); color: #0369a1; }
.tone-green { background: rgba(22,163,74,.14); color: #15803d; }
.tone-red { background: rgba(220,38,38,.13); color: #b91c1c; }
.tone-violet { background: rgba(124,58,237,.13); color: #6d28d9; }
.tone-steel { background: rgba(100,116,139,.14); color: #475569; }
[data-bs-theme="dark"] .tone-flame { color: #fdba74; }
[data-bs-theme="dark"] .tone-blue { color: #7dd3fc; }
[data-bs-theme="dark"] .tone-green { color: #86efac; }
[data-bs-theme="dark"] .tone-red { color: #fca5a5; }
[data-bs-theme="dark"] .tone-violet { color: #c4b5fd; }
[data-bs-theme="dark"] .bill-ico { color: #fdba74; }
[data-bs-theme="dark"] .bill-ico.tone-green { color: #86efac; }
[data-bs-theme="dark"] .bill-ico.tone-blue { color: #7dd3fc; }
[data-bs-theme="dark"] .bill-ico.tone-violet { color: #c4b5fd; }
.avatar, .avatar-sm, .avatar-md { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; flex: 0 0 auto; }
.avatar-md { width: 40px; height: 40px; font-size: .9rem; }
.avatar-sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar { width: 36px; height: 36px; font-size: .8rem; }
.tint-indigo { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.tint-violet { background: linear-gradient(135deg, #c084fc, #7c3aed); }
.tint-green { background: linear-gradient(135deg, #4ade80, #16a34a); }
.tint-amber { background: linear-gradient(135deg, #fcd34d, #d97706); }
.tint-cyan { background: linear-gradient(135deg, #67e8f9, #0891b2); }
.tint-pink { background: linear-gradient(135deg, #f9a8d4, #db2777); }
.tint-red { background: linear-gradient(135deg, #fca5a5, #dc2626); }
.tint-slate { background: linear-gradient(135deg, #94a3b8, #475569); }
.empty-state { padding: 34px 16px; text-align: center; }
.empty-state .es-icon { font-size: 2.4rem; color: var(--gs-flame); opacity: .55; margin-bottom: 6px; animation: bob 3s ease-in-out infinite; }
.skeleton .skel { border-radius: 16px; background: linear-gradient(90deg, rgba(148,163,184,.14) 25%, rgba(148,163,184,.28) 50%, rgba(148,163,184,.14) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; margin-bottom: 12px; }
.progress { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--gs-steel) 18%, transparent); overflow: hidden; }
.progress-bar.bar-grad, .bar-grad { background: var(--gs-grad) !important; border-radius: 999px; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.table { --bs-table-bg: transparent; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gs-muted); font-weight: 700; border-bottom-color: var(--gs-line); white-space: nowrap; }
.table td, .table th { border-color: var(--gs-line); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-responsive { -webkit-overflow-scrolling: touch; }
.form-control, .form-select { border-radius: 12px; border-color: var(--gs-line); }
.form-control:focus, .form-select:focus { border-color: var(--gs-flame); box-shadow: 0 0 0 4px rgba(249,115,22,.15); }
.btn { border-radius: 12px; font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:active { transform: scale(.98); }
.btn-primary { --bs-btn-bg: #ea580c; --bs-btn-border-color: #ea580c; --bs-btn-hover-bg: #c2410c; --bs-btn-hover-border-color: #c2410c; --bs-btn-active-bg: #c2410c; --bs-btn-active-border-color: #c2410c; }
.btn-light { --bs-btn-bg: var(--gs-surface-2); --bs-btn-border-color: var(--gs-line); --bs-btn-hover-bg: var(--gs-surface-2); --bs-btn-color: var(--gs-ink); }
.btn-pop:hover { transform: translateY(-1px) scale(1.02); }
.badge { font-weight: 600; }
.modal-content { border: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.modal-header { border-bottom-color: var(--gs-line); }
.modal-footer { border-top-color: var(--gs-line); }
.modal.fade .modal-dialog { transition: transform .32s cubic-bezier(.2,.9,.3,1.1), opacity .25s; }
.modal.fade .modal-dialog { transform: translateY(18px) scale(.98); }
.modal.show .modal-dialog { transform: none; }
.offcanvas { background: var(--gs-surface); }
.offcanvas .nav-link { color: var(--gs-ink); }
.offcanvas .nav-link.active { color: #fff; }
.offcanvas .nav-section { color: var(--gs-muted); }
.dropdown-menu { border-radius: 14px; border-color: var(--gs-line); box-shadow: var(--gs-shadow-lift); }
.toast { border-radius: 14px; overflow: hidden; box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); }
.toast.show { animation: toast-in .4s cubic-bezier(.2,.9,.3,1.2) both; }
#loading-overlay { position: fixed; inset: 0; z-index: 2050; background: rgba(15,23,42,.25); display: grid; place-items: center; backdrop-filter: blur(2px); }
#loading-overlay > div { animation: pop .3s both; }
.pager-more { background: transparent; border: 0; width: 100%; padding: 12px; color: var(--gs-flame-2); font-weight: 600; }
.pager-more:hover { background: color-mix(in srgb, var(--gs-flame) 8%, transparent); }
.form-check-input:checked { background-color: var(--gs-flame-2); border-color: var(--gs-flame-2); }
.form-switch .form-check-input:checked { background-color: var(--gs-flame-2); }
.btn-check:checked + .btn-outline-secondary { background: var(--gs-flame-2); border-color: var(--gs-flame-2); color: #fff; }
.btn-outline-secondary { --bs-btn-color: var(--gs-ink); --bs-btn-border-color: var(--gs-line); --bs-btn-hover-bg: var(--gs-surface-2); --bs-btn-hover-color: var(--gs-ink); --bs-btn-hover-border-color: var(--gs-line); }
.btn-group .btn.active { background: var(--gs-flame-2) !important; color: #fff !important; border-color: var(--gs-flame-2) !important; }

/* ---------- Visual: cylinders, tank, ring ---------- */
.cyl { width: 64px; height: 128px; flex: 0 0 64px; overflow: visible; }
.cyl-body { fill: color-mix(in srgb, var(--gs-steel) 22%, transparent); stroke: var(--gs-steel); stroke-opacity: .35; stroke-width: 1.5; }
.cyl-fill { fill: url(#grad-flame); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1.1s cubic-bezier(.2,.8,.2,1); }
.cyl-fill.is-in { transform: scaleY(1); }
.cyl.tone-water .cyl-fill { fill: url(#grad-water); }
.cyl.tone-steel .cyl-fill { fill: url(#grad-steel); }
.cyl-shine { fill: rgba(255,255,255,.45); }
.cyl-band { fill: #334155; opacity: .35; }
.cyl-valve { fill: #475569; }
.cyl-valve-tip { fill: #fbbf24; }
.cyl-fill { animation: none; }
.cyl-fill.is-in { animation: cyl-glow 3s ease-in-out 1.1s infinite; }
.tank-card { padding: 18px; }
.tank-wrap { display: flex; justify-content: center; }
.tank { width: 100%; max-width: 300px; height: auto; overflow: visible; }
.tank-big { margin-top: 4px; }
.tank-big .tank { max-width: 420px; }
.tank-shell { fill: color-mix(in srgb, var(--gs-steel) 14%, transparent); stroke: var(--gs-steel); stroke-width: 2.5; stroke-opacity: .5; }
.tank-liquid { fill: url(#grad-water); transition: transform 1.4s cubic-bezier(.2,.8,.2,1); }
.tank-liquid:not(.is-in) { transform: translateY(124px) !important; }
.wave { fill: url(#grad-water); opacity: .95; }
.wave-back { opacity: .45; }
.wave-track { animation: wave-scroll 3.2s linear infinite; }
.tank-gloss { fill: rgba(255,255,255,.35); }
.tank-pct { font-size: 20px; font-weight: 800; fill: var(--gs-ink); paint-order: stroke; stroke: var(--gs-surface); stroke-width: 4px; }
.ring { display: block; }
.ring-track { stroke: color-mix(in srgb, var(--gs-steel) 20%, transparent); }
.ring-bar { stroke: var(--gs-flame); transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.ring.tone-water .ring-bar { stroke: var(--gs-water); }

/* ---------- Dashboard ---------- */
.hero-card {
  position: relative; overflow: hidden; border-radius: 24px; padding: 24px 22px; background: linear-gradient(120deg, #7c2d12 0%, #c2410c 45%, #dc2626 100%); color: #fff;
  box-shadow: 0 24px 50px -22px rgba(194,65,12,.75);
}
.hero-card::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(253,224,71,.35), transparent 65%); right: -60px; top: -90px; animation: drift 10s ease-in-out infinite alternate; }
.hero-flame { position: absolute; right: 18px; bottom: -6px; display: flex; align-items: flex-end; gap: 6px; opacity: .9; pointer-events: none; }
.hero-flame span { display: block; width: 26px; border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%; background: linear-gradient(to top, #fde047, #fb923c 55%, rgba(251,146,60,0)); animation: flame-dance 1.6s ease-in-out infinite; transform-origin: bottom; }
.hero-flame span:nth-child(1) { height: 46px; animation-delay: -.2s; }
.hero-flame span:nth-child(2) { height: 72px; width: 32px; animation-delay: -.7s; }
.hero-flame span:nth-child(3) { height: 52px; animation-delay: -1.1s; }
.text-white-50 { color: rgba(255,255,255,.78) !important; }
.tank-card .d-flex .fw-semibold { font-weight: 700; }
.cyl-card { padding: 14px; }
.cyl-count { margin: 4px 0; }
.cyl-count .fw-bold { font-size: 1.8rem; line-height: 1; font-variant-numeric: tabular-nums; }
.cyl-name { font-size: .88rem; line-height: 1.2; }
.cyl { width: 56px; height: 112px; flex-basis: 56px; }
.cyl-card .badge { font-weight: 600; }
.dues-card { padding: 18px; }
.setup-note { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-left: 4px solid var(--gs-flame); flex-wrap: wrap; }
.setup-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(249,115,22,.14); color: #c2410c; flex: 0 0 40px; }
[data-bs-theme="dark"] .setup-ico { color: #fdba74; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .quick-grid { grid-template-columns: repeat(4, 1fr); } }
.quick { display: flex; align-items: center; gap: 12px; padding: 14px; font-weight: 700; color: var(--gs-ink); }
.quick-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 1.15rem; flex: 0 0 42px; transition: transform .3s; }
.quick:hover .quick-ico { transform: rotate(-8deg) scale(1.08); }
.tile-grid, .kind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kind-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bar-row { margin-bottom: 12px; animation: rise .5s both; animation-delay: var(--d, 0s); }
.bar-track { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--gs-steel) 16%, transparent); overflow: hidden; margin-top: 4px; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--gs-grad); transition: width 1.1s cubic-bezier(.2,.8,.2,1); }

/* ---------- Counter sale ---------- */
.pos-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 992px) { .pos-grid { grid-template-columns: minmax(0, 1fr) 390px; } .pos-cart { position: sticky; top: 76px; } }
.pos-top { padding: 10px; margin-bottom: 6px; }
.pos-customer { width: 100%; display: flex; align-items: center; gap: 12px; background: transparent; border: 0; color: var(--gs-ink); padding: 6px; border-radius: 14px; text-align: left; }
.pos-customer:hover { background: color-mix(in srgb, var(--gs-flame) 7%, transparent); }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1px solid var(--gs-line); background: var(--gs-surface); color: var(--gs-ink); text-align: left; }
.tile:active { transform: scale(.97); }
.tile-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 4px; transition: transform .3s; }
.tile-refill .tile-ico { background: rgba(249,115,22,.15); color: #c2410c; }
.tile-swap .tile-ico { background: rgba(14,165,233,.15); color: #0369a1; }
.tile:hover .tile-ico { transform: rotate(-10deg) scale(1.1); }
[data-bs-theme="dark"] .tile-refill .tile-ico { color: #fdba74; }
[data-bs-theme="dark"] .tile-swap .tile-ico { color: #7dd3fc; }
.tile-name { font-weight: 800; font-size: .95rem; line-height: 1.2; }
.tile-sub { font-size: .78rem; color: var(--gs-muted); }
.tile.is-out { opacity: .6; }
.tile.is-out::after { content: "Out of stock"; position: absolute; right: 10px; bottom: 10px; font-size: .65rem; font-weight: 700; background: #fee2e2; color: #991b1b; padding: 2px 7px; border-radius: 999px; }
.acc-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.acc-hit { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--gs-flame) 40%, transparent); background: var(--gs-surface); color: var(--gs-ink); animation: rise .3s both; }
.acc-hit:hover { border-style: solid; border-color: var(--gs-flame); }
.acc-hit i { font-size: 1.3rem; transition: transform .2s; }
.acc-hit:hover i { transform: scale(1.15); }
.cart-head { padding: 16px 16px 10px; border-bottom: 1px solid var(--gs-line); }
.cart-lines { min-height: 90px; max-height: 58vh; overflow-y: auto; }
.cart-line { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--gs-line); animation: slide-in .35s both; animation-delay: var(--d, 0s); }
.cart-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 38px; }
.cart-ico.tone-flame { background: rgba(249,115,22,.15); color: #c2410c; }
.cart-ico.tone-blue { background: rgba(14,165,233,.15); color: #0369a1; }
.cart-ico.tone-violet { background: rgba(124,58,237,.14); color: #6d28d9; }
.cart-empty { padding: 26px 16px; text-align: center; }
.cart-empty-ico { font-size: 2rem; color: var(--gs-flame); opacity: .5; animation: bob 3s ease-in-out infinite; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper-label { font-size: .72rem; color: var(--gs-muted); min-width: 56px; }
.stepper .btn { width: 32px; height: 32px; padding: 0; line-height: 1; font-size: 1.1rem; font-weight: 700; border-radius: 10px; }
.stepper-val { min-width: 34px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; animation: tick .25s both; }
.rate-field { display: flex; align-items: center; gap: 6px; }
.rate-field .form-control { width: 92px; height: 32px; padding: 2px 8px; }
.cart-sum { padding: 14px 16px 18px; }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .92rem; margin-bottom: 6px; }
.sum-input { width: 130px; text-align: right; font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; font-weight: 700; padding: 10px 0 6px; border-top: 1px dashed var(--gs-line); margin-top: 6px; }
.sum-total > span:last-child { font-size: 1.7rem; font-weight: 900; background: var(--gs-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; animation: tick .35s both; }
.method-seg .btn { font-weight: 700; }
.done-wrap { text-align: center; padding: 8px 0 4px; }
.done-check { width: 84px; height: 84px; }
.done-check circle { fill: none; stroke: #16a34a; stroke-width: 3; stroke-dasharray: 152; stroke-dashoffset: 152; animation: draw .6s .1s ease-out forwards; }
.done-check path { fill: none; stroke: #16a34a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .45s .6s ease-out forwards; }
.supplier-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; color: var(--gs-ink); }
.purchase-page .cart-line { padding: 12px 14px; }

/* ---------- Stock ---------- */
.stock-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: color-mix(in srgb, var(--gs-steel) 10%, transparent); border-radius: 16px; scrollbar-width: none; }
.stock-tab { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 12px; color: var(--gs-muted); text-decoration: none; font-weight: 700; font-size: .9rem; white-space: nowrap; transition: background .25s, color .25s; }
.stock-tab.active { background: var(--gs-surface); color: var(--gs-flame-2); box-shadow: var(--gs-shadow); }
.cyl-stock { padding: 16px; }
.mini-stat { display: flex; flex-direction: column; padding: 6px 12px; border-radius: 12px; min-width: 72px; }
.mini-stat span { font-size: 1.35rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mini-stat small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; opacity: .8; }
.item-row { cursor: pointer; }
.item-row.is-low { background: color-mix(in srgb, #f59e0b 9%, transparent); }
.stock-pill { display: inline-block; min-width: 48px; text-align: center; padding: 4px 10px; border-radius: 999px; font-weight: 800; background: rgba(22,163,74,.13); color: #15803d; font-variant-numeric: tabular-nums; }
.stock-pill.is-low { background: rgba(245,158,11,.18); color: #b45309; }
.stock-pill.is-zero { background: rgba(220,38,38,.15); color: #b91c1c; }
[data-bs-theme="dark"] .stock-pill { color: #86efac; }
[data-bs-theme="dark"] .stock-pill.is-low { color: #fcd34d; }
[data-bs-theme="dark"] .stock-pill.is-zero { color: #fca5a5; }
.moves td, .moves th { font-size: .88rem; }

/* ---------- Ledger & parties ---------- */
.supplier-pick .btn { white-space: nowrap; }
.ledger-hero { padding: 20px; border-top: 4px solid var(--gs-flame); }
.ledger-hero.is-owed { border-top-color: #f97316; }
.ledger-hero.is-credit { border-top-color: #0ea5e9; }
.ledger-amt { font-size: 2.1rem; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.statement td, .statement th { font-size: .9rem; }
.btn-pay { font-weight: 700; padding: 10px 18px; }

/* ---------- Reports ---------- */
.report-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.report-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--gs-line); background: var(--gs-surface); color: var(--gs-ink); text-decoration: none; font-weight: 700; font-size: .88rem; transition: transform .2s, background .2s; }
.report-chip:hover { transform: translateY(-1px); }
.report-chip.active { background: var(--gs-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px rgba(234,88,12,.8); }
.report-table td, .report-table th { font-size: .92rem; }
.report-table tfoot td { border-top: 2px solid var(--gs-line); }

/* ---------- Backup & settings ---------- */
.backup-ico { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(249,115,22,.14); color: #c2410c; }
.backup-ico.tone-blue { background: rgba(14,165,233,.14); color: #0369a1; }
[data-bs-theme="dark"] .backup-ico { color: #fdba74; }
[data-bs-theme="dark"] .backup-ico.tone-blue { color: #7dd3fc; }
.type-head, .type-row { display: grid; grid-template-columns: 2fr 1fr 1.3fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.type-head { padding: 0 2px; }
.type-row { animation: rise .35s both; }
.type-row .btn { padding: 6px 10px; }

/* ---------- Print (receipt / reports) ---------- */
#print-area { display: none; }
@media print {
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
}
.receipt { font-family: 'Courier New', ui-monospace, monospace; color: #000; width: 80mm; max-width: 100%; margin: 0 auto; padding: 4mm; font-size: 12px; background: #fff; }
.receipt.wide { width: 100%; max-width: 780px; font-family: Inter, system-ui, sans-serif; font-size: 13px; }
.receipt .pr-head { text-align: center; border-bottom: 1px dashed #000; padding-bottom: 6px; margin-bottom: 6px; }
.receipt .pr-name { font-size: 17px; font-weight: 800; }
.receipt .pr-tag, .receipt .pr-small { font-size: 11px; }
.receipt .pr-meta { font-size: 11px; margin-bottom: 6px; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt .pr-table td, .receipt .pr-table th { padding: 2px 0; vertical-align: top; text-align: left; }
.receipt .pr-table .num { text-align: right; white-space: nowrap; }
.receipt .pr-sub td { font-size: 11px; color: #333; padding-bottom: 4px; border-bottom: 1px dotted #999; }
.receipt .pr-totals { margin-top: 6px; border-top: 1px dashed #000; padding-top: 4px; }
.receipt .pr-grand td { font-weight: 800; font-size: 14px; border-top: 1px solid #000; }
.receipt .pr-foot { text-align: center; margin-top: 8px; font-size: 11px; border-top: 1px dashed #000; padding-top: 6px; }
.receipt.wide .pr-table td, .receipt.wide .pr-table th { padding: 4px 6px; border-bottom: 1px solid #ddd; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes tick { from { transform: scale(1.18); } to { transform: none; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,-20px) scale(1.08); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes wave { from { transform: translateX(0); } to { transform: translateX(-104px); } }
@keyframes wave-scroll { from { transform: translateX(0); } to { transform: translateX(-110px); } }
@keyframes rise-liquid { from { transform: translateY(-6px); } to { transform: translateY(6px); } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1) rotate(-2deg); opacity: .95; } 50% { transform: scale(.92, 1.08) rotate(3deg); opacity: .75; } }
@keyframes flame-dance { 0%, 100% { transform: scaleY(1) scaleX(1); } 50% { transform: scaleY(1.12) scaleX(.9); } }
@keyframes slide { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes ember { 0% { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-110vh) translateX(30px) scale(.4); opacity: 0; } }
@keyframes attention { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 12px 26px -8px rgba(234,88,12,.85), 0 0 0 0 rgba(249,115,22,.5); } 70% { box-shadow: 0 12px 26px -8px rgba(234,88,12,.85), 0 0 0 16px rgba(249,115,22,0); } 100% { box-shadow: 0 12px 26px -8px rgba(234,88,12,.85), 0 0 0 0 rgba(249,115,22,0); } }
@keyframes cyl-glow { 0%, 100% { filter: none; } 50% { filter: drop-shadow(0 0 6px rgba(251,146,60,.55)); } }

.anim-rise { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0s); }
.anim-slide { animation: slide-in .35s both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .card-lift:hover { transform: none; }
}
