/* 🧾 Հաշիվներ՝ «թերթը» (նույն գույները, ինչ Excel «հաշիվներ»-ում) */

/* ======================================================================== թերթ */
.inv-sheet {
  --i-head: #BFBFBF; --i-head-ink: #111; --i-bg: #FFFFFF; --i-ink: #111; --i-line: #3B3F46;
  --i-yellow: #FFFF00; --i-light: #FFFFCC; --i-pink: #FFCCFF; --i-red: #E00000; --i-hover: rgba(46, 80, 220, .07);
  overflow: auto; max-height: calc(100vh - 150px); border-radius: 12px; border: 1px solid var(--line);
  background: var(--i-bg); -webkit-overflow-scrolling: touch;
}
[data-theme="dark"] .inv-sheet {
  --i-head: #333860; --i-head-ink: #ECEDF7; --i-bg: #14172F; --i-ink: #ECEDF7; --i-line: #3A3F68;
  --i-yellow: #575214; --i-light: #3A3823; --i-pink: #57304F; --i-red: #FF8080; --i-hover: rgba(160, 170, 255, .08);
}
.inv-sheet table { border-collapse: collapse; width: 100%; min-width: 980px; color: var(--i-ink);
  font: 600 13.5px/1.3 "Noto Sans Armenian", Manrope, "Segoe UI", Arial, sans-serif; }
.inv-sheet th { position: sticky; top: 0; z-index: 3; background: var(--i-head); color: var(--i-head-ink);
  font-weight: 800; font-size: 12px; padding: 8px 6px; border: 1px solid var(--i-line);
  text-align: center; white-space: nowrap; }
.inv-sheet td { border: 1px solid var(--i-line); padding: 5px 6px; text-align: center; vertical-align: middle;
  background: var(--rb, var(--i-bg)); }
.inv-sheet tr.r { cursor: pointer; }
.inv-sheet tr.r td { --rb: var(--i-bg); }
.inv-sheet tr.r.open td, .inv-sheet tr.r.todo td { --rb: var(--i-yellow); }          /* դեռ չի գրված / ⚠ */
.inv-sheet tr.r.bubuka td { --rb: var(--i-light); }                                  /* Bubuka */
.inv-sheet tr.r.bubuka.todo td { --rb: var(--i-yellow); }
.inv-sheet tr.r td.pf { --rb: var(--i-pink); }                                       /* ՆԱԽԱՀԱՇԻՎ, բյուջե */
.inv-sheet tr.r.canceled td { --rb: var(--i-bg); color: var(--muted); text-decoration: line-through; }
.inv-sheet tr.r:hover td:not(.n) { box-shadow: inset 0 0 0 999px var(--i-hover); }
.inv-sheet td.n { font-weight: 800; font-size: 15px; width: 38px; }
.inv-sheet td.cl { font-weight: 800; font-size: 14px; min-width: 160px; }
.inv-sheet td.st { min-width: 100px; }
.inv-sheet td.nw { white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-sheet td.amt { color: var(--i-red); font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.inv-sheet td.nt { min-width: 160px; font-weight: 500; white-space: pre-wrap; }
.inv-sheet td.nt > * + * { margin-top: 3px; }
.inv-sheet .bud { font-weight: 700; }
.inv-sheet td.act { width: 1%; padding: 2px 4px; background: var(--card); }
.inv-act { display: flex; gap: 2px; flex-wrap: nowrap; justify-content: flex-end; }
.inv-act button { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px;
  font-size: 12px; color: var(--muted); }
.inv-act button:hover { background: var(--soft); color: var(--violet); }
.inv-act button.del:hover { background: var(--err-bg); color: var(--err); }
.inv-act button:focus-visible { outline: 2px solid var(--violet); }
.inv-sheet tfoot td { font-weight: 800; background: var(--i-bg); border-top: 2px solid var(--i-line); }
.inv-sheet tfoot td.lbl { text-align: right; }
.inv-open { font-weight: 800; white-space: nowrap; }
.inv-ok { all: unset; cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: 6px; }
.inv-ok:hover { background: rgba(0, 0, 0, .08); }
.inv-ok:focus-visible, .inv-due:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.inv-due { all: unset; cursor: pointer; display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 700; background: rgba(0, 0, 0, .06); white-space: nowrap; }
.inv-due.soon { background: #FFD9A8; color: #7A3E00; }
.inv-due.overdue { background: #FFC9C4; color: #9B1C14; }
[data-theme="dark"] .inv-due { background: rgba(255, 255, 255, .1); }
[data-theme="dark"] .inv-due.soon { background: #5A3A12; color: #FFD9A8; }
[data-theme="dark"] .inv-due.overdue { background: #5C1D1A; color: #FFC9C4; }
.inv-raw { color: #C0150B; font-weight: 800; }
[data-theme="dark"] .inv-raw { color: #FF8A80; }

/* ======================================================================== ամփոփում */
.inv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.inv-tile { text-align: left; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); padding: 10px 12px; cursor: pointer; font: inherit; }
.inv-tile:hover { border-color: var(--violet); }
.inv-tile.on { outline: 2px solid var(--violet); outline-offset: 1px; }
.inv-tile .k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.inv-tile .v { font-size: 22px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }
.inv-tile .s { font-size: 11.5px; color: var(--muted); }
.inv-tile.sum { border-left-color: var(--violet); }
.inv-tile.ok { border-left-color: var(--ok); }
.inv-tile.open { border-left-color: #E6D800; }
.inv-tile.pink { border-left-color: #F09AF0; }
.inv-tile.light { border-left-color: #EFE79A; }
.inv-tile.alert { border-left-color: #F08C00; }
.inv-tile.bad { border-left-color: var(--err); }
.inv-tabdot { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; font-size: 11px;
  font-weight: 800; line-height: 17px; text-align: center; background: #FFF06A; color: #4A4300; }
.inv-tabdot.alert { background: #FFD9A8; color: #7A3E00; }
.yc-tab.on .inv-tabdot { background: rgba(255, 255, 255, .9); }

/* ======================================================================== ☁️ Google Drive (🏙 Երևան Սիթի) */
.gd-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px;
  margin-bottom: 12px; font-weight: 600; background: var(--soft); }
.gd-state.ok { background: var(--ok-bg); color: var(--ok); }
.gd-state.bad { background: var(--err-bg); color: var(--err); }
.gd-state.run { background: var(--warn-bg); color: var(--warn); }
.gd-steps { margin: 6px 0 12px; padding-left: 20px; }
.gd-steps li { margin: 5px 0; }
.gd-steps code { font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 5px; }

@media (max-width: 760px) {
  .inv-sheet { max-height: none; }
  .inv-tile .v { font-size: 19px; }
}
