/* The Costs page: every class starts with .cs- (or is under .costs). Colours come from the theme variables so day / night and the themes just work. */
html body nav#nav a[data-page="costs"] { --ic: #e8b04a; }
html body #page .costs { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html body #page .costs h3 { display: flex; align-items: center; gap: 8px; }
html body #page .costs h3 small { font-weight: 400; font-size: 12px; }
/* the bar: the month, the calendar, the rates of the day */
html body #page .cs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 14px; }
html body #page .cs-nav { display: flex; align-items: center; gap: 8px; } html body #page .cs-nav b { min-width: 120px; text-align: center; font-size: 15px; }
html body #page .cs-mon { display: flex; flex-direction: column; align-items: center; min-width: 120px; line-height: 1.25; } html body #page .cs-mon b { min-width: 0; } html body #page .cs-mon small { color: var(--mut); font-size: 11px; white-space: nowrap; }
html body #page .cs-today { display: flex; flex-direction: column; line-height: 1.25; padding: 2px 12px; border-left: 2px solid var(--acc-2); } html body #page .cs-today b { font-size: 14px; } html body #page .cs-today small { color: var(--mut); font-size: 11px; white-space: nowrap; }
html body #page .cs-bar.cs-wait { opacity: .6; pointer-events: none; transition: opacity .15s; }
html body #page .cs-fill { flex: 1 1 0; min-width: 0; }
html body #page .cs-seg { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
html body #page .cs-seg button { border: 0; background: transparent; color: var(--mut); padding: 5px 12px; border-radius: 8px; font-size: 12.5px; cursor: pointer; }
html body #page .cs-seg button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset; }
html body #page .cs-rates { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
html body #page .cs-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); white-space: nowrap; }
html body #page .cs-chip .cs-sym { color: var(--acc-2); font-weight: 700; } html body #page .cs-chip b { font-size: 14px; } html body #page .cs-chip small { color: var(--mut); font-size: 11px; }
html body #page .cs-chip em { font-style: normal; font-size: 11px; } html body #page .cs-chip em.up { color: var(--bad); } html body #page .cs-chip em.dn { color: var(--ok); } html body #page .cs-chip em.flat { color: var(--mut); }      /* (the dollar against the lira is no cost of yours: no red, no green) */
html body #page .cs-live { display: inline-flex; align-items: center; gap: 8px; padding: 0 4px; }
html body #page .cs-live span { display: flex; flex-direction: column; line-height: 1.25; } html body #page .cs-live b { font-size: 12.5px; font-weight: 600; } html body #page .cs-live small { color: var(--mut); font-size: 11px; }
html body #page .cs-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--unk); flex: none; }
html body #page .cs-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(61,220,151,.18); } html body #page .cs-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(255,196,77,.18); }
html body #page .cs-ic { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; }
/* Finance: the three parts (Overview, Income, Expenses), and under Income / Expenses the tabs of their sections */
html body #page .cs-top { display: flex; gap: 8px; }
html body #page .cs-top button { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; min-height: 46px; overflow: visible; line-height: 1.2; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--mut); font-size: 15px; font-weight: 600; cursor: pointer; }
html body #page .cs-top button small { font-size: 12px; font-weight: 500; opacity: .85; }
html body #page .cs-top button:hover { color: var(--text); }
html body #page .cs-top button.on { color: var(--text); border-color: var(--line-hi); background: var(--panel-2); box-shadow: 0 -3px 0 var(--acc-2) inset; }
html body #page .cs-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
/* the tabs of the sections */
html body #page .cs-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
html body #page .cs-tabs button { flex: none; display: inline-flex; align-items: baseline; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--mut); font-size: 13px; cursor: pointer; white-space: nowrap; }
html body #page .cs-tabs button small { font-size: 11px; opacity: .85; }
html body #page .cs-tabs button:hover { color: var(--text); }
html body #page .cs-tabs button.on { color: var(--text); border-color: var(--line-hi); background: var(--panel-2); box-shadow: 0 -2px 0 var(--acc-2) inset; }
html body #page .cs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
html body #page .cs-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); min-width: 0; }
html body #page .cs-tile small { color: var(--mut); font-size: 12px; } html body #page .cs-tile b { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; } html body #page .cs-tile b small { font-size: 12px; font-weight: 500; }
html body #page .cs-tile span { color: var(--mut); font-size: 12px; }
html body #page .cs-tile.cs-big { border-color: var(--line-hi); } html body #page .cs-tile.cs-big b { color: var(--acc-2); }
html body #page .cs-usd { color: var(--mut); font-weight: 400; white-space: nowrap; }
html body #page .cs-neg { color: var(--bad); } html body #page .cs-pos { color: var(--ok); } html body #page .cs-d2 { display: block; font-size: 10.5px; font-weight: 400; }
/* the summary of the Overview: ONE card - the progress of the month, a column each for income / expenses / profit / one GB, and the bar that divides the income */
html body #page .cs-kpi { padding: 0; overflow: hidden; }
html body #page .cs-prog { display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--mut); white-space: nowrap; } html body #page .cs-prog b { color: var(--text); font-weight: 600; }
html body #page .cs-prog i { flex: 1 1 0; min-width: 40px; height: 6px; border-radius: 6px; background: var(--panel-2); position: relative; overflow: hidden; } html body #page .cs-prog i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--grad); border-radius: 6px; }
html body #page .cs-prog em { font-style: normal; font-size: 10.5px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--line); }
html body #page .cs-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } html body #page .cs-cols.cs-c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html body #page .cs-col { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px 14px; min-width: 0; border-left: 1px solid var(--line); } html body #page .cs-col:first-child { border-left: 0; }
html body #page .cs-l { color: var(--mut); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
html body #page .cs-v { font-size: 26px; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } html body #page .cs-v small { margin-left: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--mut); }
html body #page .cs-u { min-height: 17px; color: var(--mut); font-size: 12.5px; font-variant-numeric: tabular-nums; }
html body #page .cs-col dl { margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; } html body #page .cs-col dl:empty { display: none; }
html body #page .cs-col dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; } html body #page .cs-col dt { color: var(--mut); white-space: nowrap; }
html body #page .cs-col dd { margin: 0; min-width: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } html body #page .cs-col dd small { color: var(--mut); font-weight: 400; font-size: 11px; }
html body #page .cs-pgb { background: linear-gradient(180deg, rgba(120,160,255,.08), transparent 70%); } html body #page .cs-pgb .cs-v:not(.cs-pos):not(.cs-neg) { color: var(--acc-2); }
html body #page .cs-split { padding: 12px 18px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
html body #page .cs-bar2 { display: flex; height: 8px; border-radius: 6px; overflow: hidden; background: var(--panel-2); } html body #page .cs-bar2 i { display: block; height: 100%; }
html body #page .cs-bar2 i.e, html body #page .cs-leg u.e { background: var(--acc-2); } html body #page .cs-bar2 i.p, html body #page .cs-leg u.p { background: var(--ok); } html body #page .cs-bar2 i.e.loss, html body #page .cs-leg u.e.loss { background: var(--bad); }
html body #page .cs-leg { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; color: var(--mut); } html body #page .cs-leg span { display: inline-flex; align-items: center; gap: 6px; } html body #page .cs-leg b { color: var(--text); font-weight: 600; }
html body #page .cs-leg u { display: inline-block; width: 9px; height: 9px; border-radius: 3px; text-decoration: none; }
html body #page .cs-hint { padding: 9px 13px; border-radius: var(--r-s); border: 1px dashed var(--line); color: var(--mut); font-size: 13px; }
html body #page .cs-sec-hint { margin: 0 0 8px; font-size: 12.5px; }
html body #page .cs-warn { padding: 9px 13px; border-radius: var(--r-s); border: 1px solid rgba(255,200,70,.45); color: var(--warn); font-size: 13px; }
html body #page .cs-gr { display: grid; grid-template-columns: minmax(130px, 220px) 1fr auto; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; }
html body #page .cs-gr i { height: 8px; border-radius: 6px; background: var(--panel-2); position: relative; overflow: hidden; } html body #page .cs-gr i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--grad); border-radius: 6px; }
html body #page .cs-link { cursor: pointer; border-radius: 8px; } html body #page .cs-link:hover { background: var(--panel); }
html body #page .cs-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; font-size: 14px; } html body #page .cs-total i, html body #page .cs-sub i { background: transparent; } html body #page .cs-total i::after, html body #page .cs-sub i::after { display: none; }
html body #page .cs-total b { font-size: 16px; color: var(--acc-2); } html body #page .cs-sub { color: var(--mut); }
html body #page .costs .tbl .r { text-align: right; white-space: nowrap; } html body #page .costs .tbl td small { color: var(--mut); }
html body #page .cs-none { color: var(--warn); font-size: 12px; }
html body #page .cs-idle td { opacity: .55; }
html body #page .cs-note { display: block; }
html body #page .cs-note.cs-near { color: var(--warn); } html body #page .cs-note.cs-over { color: var(--bad); }
html body #page .cs-act { display: inline-flex; gap: 6px; justify-content: flex-end; }
html body #page .cs-scroll { max-height: 560px; overflow-y: auto; padding-right: 2px; }
html body #page .cs-items { width: 100%; }
html body #page .cs-items td:nth-child(1), html body #page .cs-items td:nth-child(2) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }      /* (a name and a price are read whole: the cell grows taller, it is not cut) */
/* the servers: one small table, a row for each server (its prices | what it carried and cost so far | the whole month), the total at the foot */
html body #page .cs-addbar h3 { margin: 0 0 10px; } html body #page .cs-addbar h3 button { flex: none; white-space: nowrap; } html body #page .cs-addbar h3 small { flex: 1 1 0; min-width: 0; text-align: right; }
html body #page .cs-xs { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
html body #page .cs-tbl { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
html body #page .cs-tbl th { color: var(--mut); font-weight: 500; font-size: 11px; text-align: left; padding: 4px 10px; white-space: nowrap; border-bottom: 1px solid var(--line); }
html body #page .cs-tbl th.cs-grp { text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line-hi); text-align: center; }
html body #page .cs-tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
html body #page .cs-tbl .r { text-align: right; }
html body #page .cs-tbl tbody tr:hover { background: var(--panel); }
html body #page .cs-tbl td small { color: var(--mut); font-size: 10.5px; } html body #page .cs-tbl td .cs-note { display: block; }
html body #page .cs-tbl td.cs-tot { font-weight: 600; } html body #page .cs-tbl .cs-mo { color: var(--acc-2); font-weight: 700; }
html body #page .cs-tbl tfoot td { border-top: 1px solid var(--line-hi); border-bottom: 0; padding-top: 8px; font-weight: 700; }
html body #page .cs-pen { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; min-height: 0; padding: 0; margin-left: 4px; border: 0; border-radius: 6px; background: transparent; box-shadow: none; color: var(--mut); font-size: 14px; line-height: 1; cursor: pointer; vertical-align: middle; opacity: .45; }      /* (no button shadow: a quiet "more", not a pill) */
html body #page .cs-pen:hover, html body #page .cs-tbl tr:hover .cs-pen { opacity: 1; } html body #page .cs-pen:hover { background: var(--panel-2); color: var(--text); box-shadow: none; }
/* a number changed where it stands: the number itself is the button; a click turns it into a small box */
html body #page .cs-ed { cursor: text; border-radius: 5px; padding: 1px 4px; margin: 0 -4px; border-bottom: 1px dashed transparent; } html body #page .cs-ed:hover { background: var(--panel-2); border-bottom-color: var(--acc-2); }
html body #page .cs-in { width: 118px; height: 24px; min-height: 0; padding: 0 6px; box-sizing: border-box; text-align: right; font: inherit; font-variant-numeric: tabular-nums; color: var(--text); background: var(--panel-2); border: 1px solid var(--acc-2); border-radius: 6px; outline: none; box-shadow: 0 0 0 3px rgba(120,160,255,.18); }
html body #page .cs-add { color: var(--mut); } html body #page .cs-add:hover { color: var(--text); }
html body #page .cs-ed:has(.cs-in) { background: transparent; border-bottom-color: transparent; cursor: default; } html body #page .cs-ed .cs-in + small { margin-left: 4px; }
html body #page .cs-hist { display: flex; flex-direction: column; }
html body #page .cs-h { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr 1fr 1.4fr; gap: 10px; align-items: baseline; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
html body #page .cs-h:hover { background: var(--panel); } html body #page .cs-h em { font-style: normal; color: var(--acc-2); text-align: right; } html body #page .cs-h small { color: var(--mut); }
html body #page .cs-btns { display: flex; gap: 10px; margin-top: 10px; }
/* the windows: a price, the settings */
html body .cs-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
html body .cs-form .cs-f { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--mut); min-width: 0; } html body .cs-form .cs-f[hidden] { display: none; }
html body .cs-form .cs-f input, html body .cs-form .cs-f select { width: 100%; box-sizing: border-box; }
html body .cs-form .cs-wide { grid-column: 1 / -1; } html body .cs-form .cs-check { flex-direction: row; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text); } html body .cs-form .cs-check input { width: auto; }
html body .cs-form .cs-help { grid-column: 1 / -1; color: var(--mut); font-size: 12.5px; min-height: 18px; }
html body .cs-form .cs-btns { grid-column: 1 / -1; display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 900px) {
  html body #page .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } html body #page .cs-two { grid-template-columns: minmax(0, 1fr); } html body #page .cs-fill { display: none; }
  html body #page .costs .cs-items { display: block; overflow-x: auto; }
  html body #page .cs-cols, html body #page .cs-cols.cs-c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } html body #page .cs-col:nth-child(odd) { border-left: 0; } html body #page .cs-col:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  html body .cs-form { grid-template-columns: minmax(0, 1fr); } html body #page .cs-tile b { font-size: 19px; } html body #page .cs-v { font-size: 24px; } html body #page .cs-prog span:last-child { display: none; }
  html body #page .cs-cols, html body #page .cs-cols.cs-c3 { grid-template-columns: minmax(0, 1fr); } html body #page .cs-col { border-left: 0; } html body #page .cs-col + .cs-col { border-top: 1px solid var(--line); }      /* (a phone: one column each, the figures are not cut in the middle) */ html body #page .cs-h { grid-template-columns: 1fr 1fr; }
  html body #page .cs-gr { grid-template-columns: minmax(90px, 1fr) 1fr auto; } html body #page .cs-live small { display: none; }
}
