/* Gannita v116 — hero sparkline, share sheet, create-invoice form. Loaded after theme.css. */

/* ---- Dashboard hero sparkline ---- */
.hero-spark { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); position: relative; }
.hero-spark .hs-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8fc4ff; font-weight: 700; }
.hero-spark .hs-top b { font-family: var(--serif); letter-spacing: -.01em; text-transform: none; font-size: 15px; color: #fff; font-weight: 600; }
.hero-spark svg { width: 100%; height: 64px; display: block; margin-top: 6px; overflow: visible; }
.hero-spark .hs-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: #6f90bd; margin-top: 2px; }

/* ---- Share sheet ---- */
.share-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 12px; }
.share-quick button {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 16px; color: var(--ink);
  font-size: 11.5px; font-weight: 600; cursor: pointer; box-shadow: none;
}
.share-quick button:active { transform: scale(.97); }
.share-quick .sq-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.share-quick .sq-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.share-quick .wa .sq-ic { background: linear-gradient(135deg, #2bd36b, #12a150); }
.share-quick .sms .sq-ic { background: linear-gradient(135deg, #3d9bff, #0a66cc); }
.share-quick .lnk .sq-ic { background: linear-gradient(135deg, #1a6fe0, #0b1a2c); }
.share-quick .pdf .sq-ic { background: linear-gradient(135deg, #5b6985, #0b1a2c); }
.more-sheet-list.sheet-enhanced button.sq-dup { display: none; }
.more-sheet-list.sheet-enhanced button .ms-ic { width: 32px; height: 32px; padding: 6px; border-radius: 10px; background: var(--accent-soft); stroke: var(--accent-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.more-sheet-list.sheet-enhanced button.danger-text .ms-ic, .more-sheet-list.sheet-enhanced button[data-danger] .ms-ic { background: #fdebea; stroke: #c2261f; }
.more-sheet-list button { display: flex; align-items: center; gap: 12px; }

/* ---- Create / edit invoice form ---- */
.card:has(#items) > h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.card:has(#items) .field > label, .item-row label { text-transform: uppercase; letter-spacing: .09em; font-size: 10.5px; font-weight: 700; color: var(--muted-2); }
.card:has(#items) .grid.cols-2 { gap: 14px; }
.item-row { border-radius: 16px; background: linear-gradient(180deg, #fff, var(--panel-2)); border-color: var(--border); padding: 18px 44px 16px 16px; box-shadow: var(--shadow-sm); }
.item-row::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(180deg, var(--accent), var(--ink-3)); }
.item-row .del { background: #fff; border: 1px solid var(--border); color: var(--muted); }
.item-row .del:hover { background: #c2261f; border-color: #c2261f; color: #fff; }
.item-row .it-total { font-family: var(--serif); font-weight: 600; color: var(--ink); }
#add-item { border-style: dashed; border-width: 1.5px; background: transparent; color: var(--accent-2); width: 100%; padding: 12px; margin: 2px 0 4px; box-shadow: none; }
#add-item:hover { background: var(--accent-soft); }
#totals-preview.totals {
  background: radial-gradient(260px 160px at 100% 0, rgba(10,132,255,.35), transparent 65%), linear-gradient(135deg, #0b1a2c, #102845 70%, #123a6b);
  color: #cfe3ff; border: 0; border-radius: 18px; padding: 16px 18px; box-shadow: var(--shadow-md);
}
#totals-preview .line { color: #a9c3e8; }
#totals-preview .line span:last-child { color: #fff; font-variant-numeric: tabular-nums; }
#totals-preview .grand { border-top: 1px solid rgba(255,255,255,.18); color: #fff; }
#totals-preview .grand span:last-child { color: #fff; font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.card:has(#save-draft) .row:has(#save-draft) { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); box-shadow: 0 14px 30px -16px rgba(11,26,44,.5); border: 1px solid var(--border); }
@media (min-width: 900px) and (pointer: fine) { .card:has(#save-draft) .row:has(#save-draft) { bottom: 14px; } }
.card:has(#save-draft) .row:has(#save-draft) { flex-wrap: nowrap; gap: 8px; }
.card:has(#save-draft) .row:has(#save-draft) .btn { flex: 1 1 0; min-width: 0; white-space: nowrap; padding: 12px 6px; font-size: 13.5px; text-align: center; margin: 0; }
.card:has(#save-draft) .row:has(#save-draft) #cancel-inv { flex: 0 0 auto; padding: 12px 14px; }
