/* AI usage: the AI subscriptions over the next 30 days (usage.js). One row per subscription, a branch per model,
   a calendar track where each window between two resets shows the level the pace takes it to. */
#us_root {font-size: 13px; }
.us_head {display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; }
.us_head h2 {margin: 0; font-size: 16px; }
.us_head .hint, .us_grid .hint {color: var(--muted); font-size: 12px; }
.us_head .spacer, .us_foot .spacer {flex: 1; }
.us_head .out {color: #b3261e; }
.us_empty {max-width: 640px; color: var(--muted); margin: 24px 0; }
.us_grid {border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.us_row {display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); align-items: stretch; border-bottom: 1px solid var(--line-soft); }
.us_row:last-child {border-bottom: 0; }
.us_name {position: relative; padding: 7px 10px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; border-right: 1px solid var(--line-soft); }
.us_track {position: relative; min-height: 44px; }
/* the days */
.us_axis .us_name {align-items: end; }
.us_axis .us_track {min-height: 0; }
.us_days {display: flex; height: 100%; }
.us_day {display: flex; flex-direction: column; align-items: center; justify-content: flex-end; font-size: 10.5px; color: var(--muted); padding: 13px 0 3px; border-left: 1px solid var(--line-soft); overflow: hidden; font-variant-numeric: tabular-nums; box-sizing: border-box; position: relative; min-height: 38px; }
.us_day:first-child {border-left: 0; }
.us_day.we {background: var(--light_accent); }
.us_day.today {color: var(--text); font-weight: 700; }
.us_day i {font-style: normal; font-size: 9.5px; opacity: .8; }
.us_day b {position: absolute; top: 1px; left: 2px; font-size: 9.5px; color: var(--text); white-space: nowrap; }
/* a subscription, its other allowances, its models */
.us_sub {background: var(--panel-2, transparent); }
.us_sub .us_name {padding-top: 9px; padding-bottom: 9px; }
.us_sub .caret {width: 12px; color: var(--muted); cursor: pointer; font-size: 10px; }
.us_sub .caret.leaf {cursor: default; }
.us_sub .ico {color: var(--accent_color); }
.us_sub .nm {overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; min-width: 0; }
.us_editbtn {position: absolute; top: 6px; right: 6px; visibility: hidden; padding: 1px 8px; font-size: 11.5px; background: var(--panel, #fff); }
.us_row:hover .us_editbtn, .us_editbtn:focus-visible {visibility: visible; }
@media (hover: none) {
  .us_editbtn {visibility: visible; }
}
.us_meta {flex-basis: 100%; color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; padding-left: 18px; }
.us_chip {border: 1px solid var(--line); border-radius: 10px; padding: 0 7px; font-size: 11px; white-space: nowrap; }
.us_chip.warn {border-color: #b26a00; color: #b26a00; }
.us_chip.out {border-color: #b3261e; color: #b3261e; }
.us_mline {flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-left: 18px; }
.us_mline em {font-style: normal; color: var(--text); }
.us_branch .us_mline em, .us_more .us_mline em {color: var(--muted); }
.us_val {font-weight: 700; font-variant-numeric: tabular-nums; }
.us_val.out, .us_mline small.out {color: #b3261e; }
.us_val.warn, .us_mline small.warn {color: #b26a00; }
.us_mline small {flex-basis: 100%; color: var(--muted); font-size: 11.5px; }
.us_old {font-size: 11px; color: var(--muted); border-bottom: 1px dotted var(--muted); cursor: help; }
.us_name > small {flex-basis: 100%; color: var(--muted); padding-left: 18px; }
/* the track */
.us_lane {position: absolute; inset: 5px 0; }
.us_lane svg {position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.us_lane polygon {stroke-width: 0; }
.us_lane polygon.ok {fill: #3a9a5c; fill-opacity: .55; }
.us_lane polygon.warn {fill: #d9902b; fill-opacity: .6; }
.us_lane polygon.out {fill: #c8413a; fill-opacity: .7; }
.us_lane i {position: absolute; top: -5px; bottom: -5px; }
.us_now {width: 0; border-left: 2px solid var(--text); opacity: .55; }
.us_reset {width: 0; border-left: 1.5px solid var(--text); opacity: .8; margin-left: -1px; }
.us_blocked {top: 0 !important; bottom: 0 !important; background: repeating-linear-gradient(135deg, rgba(200, 65, 58, .0) 0 4px, rgba(255, 255, 255, .45) 4px 8px); pointer-events: auto; }
.us_renew {width: 0; border-left: 2px dashed var(--accent_color); margin-left: -1px; }
.us_renew b {position: absolute; top: 2px; left: 4px; font-size: 10px; font-weight: 600; color: var(--accent_color); background: var(--panel, #fff); padding: 0 3px; border-radius: 3px; white-space: nowrap; }
.us_legend {display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 2px 0; color: var(--muted); font-size: 12px; }
.us_legend span {display: inline-flex; align-items: center; gap: 5px; }
.us_legend .sw {width: 12px; height: 10px; border-radius: 2px; display: inline-block; }
.us_legend .sw.ok {background: #3a9a5c; opacity: .6; }
.us_legend .sw.warn {background: #d9902b; opacity: .65; }
.us_legend .sw.out {background: #c8413a; opacity: .75; }
.us_legend .ln {width: 0; height: 12px; display: inline-block; }
.us_legend .ln.reset {border-left: 1px solid var(--text); }
.us_legend .ln.renew {border-left: 2px dashed var(--accent_color); }
/* the editor */
.us_editor {border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 12px 14px; margin: 0 0 12px; }
.us_editor h3 {margin: 0 0 8px; font-size: 14px; }
.us_fields {display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.us_fields label {display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.us_editor input, .us_editor select {font: inherit; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); max-width: 100%; box-sizing: border-box; }
.us_editor .hint {color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.us_meters {border-collapse: collapse; width: 100%; }
.us_meters th {text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 2px 4px; }
.us_meters td {padding: 2px 4px; }
.us_meters input[type=text] {width: 100%; min-width: 80px; }
.us_meters input[type=number] {width: 84px; }
.us_presets {display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.us_err {color: #b3261e; margin: 8px 0 0; }
.us_foot {display: flex; align-items: center; gap: 8px; margin-top: 12px; }
@media (max-width: 900px) {
  .us_row {grid-template-columns: minmax(0, 1fr); }
  .us_name {border-right: 0; }
  .us_meters {display: block; overflow-x: auto; }
}
/* a view this host does not have (app.js): its tab is not shown */
.h_select_option[hidden] {display: none; }
