Files
simply-dvb/web/css/30-components.css
T
Mateusz Gruszczyński 528017b0e6
build / test (push) Waiting to run
v0.1.10
2026-11-16 22:48:34 +01:00

107 lines
8.5 KiB
CSS

/* ---------------------------------------------------------------- panels */
.grid { display: grid; gap: 10px; }
.g1 { grid-template-columns: minmax(0, 1fr); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel > header h2 { font-size: 14px; }
.panel + .panel, .grid + .panel, .panel + .grid, .grid + .grid { margin-top: 10px; }
.grid > .panel + .panel { margin-top: 0; }
.stat .label, .label { font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .value { font: 500 26px var(--mono); margin-top: 8px; }
.stat .sub { font: 11px var(--mono); color: var(--muted); margin-top: 4px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 12px; }
.kv > :nth-child(odd) { color: var(--muted); font: 11px var(--mono); padding-top: 1px; }
.pill { display: inline-block; font: 10px var(--mono); letter-spacing: .06em; padding: 2px 7px; border: 1px solid var(--field-line); border-radius: 2px; color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--green); border-color: #576847; }
.pill.warn { color: var(--yellow); border-color: var(--notice-line); }
.pill.err { color: var(--red); border-color: var(--danger-line); }
.pill.acc { color: var(--accent); border-color: #6d5a45; }
.pill.blue { color: var(--blue); border-color: #3b5272; }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-line); color: var(--text); padding: 10px 12px; border-radius: var(--radius); font-size: 12px; margin-bottom: 10px; }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
/* meters */
.meter { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0 2px; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.meter.good > i { background: var(--green); }
.meter.bad > i { background: var(--red); }
.meter.blue > i { background: var(--blue); }
.spark { width: 100%; height: 46px; display: block; }
.spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.spark .area { fill: var(--accent); opacity: .12; stroke: none; }
/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { text-align: left; font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 6px 8px; border-bottom: 1px solid var(--row-line); vertical-align: middle; }
tr:hover td { background: var(--panel2); }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.actions-cell { text-align: right; white-space: nowrap; }
tr.dragging td { opacity: .4; }
tr.drop-target td { border-top: 2px solid var(--accent); }
.drag { cursor: grab; color: var(--subtle); user-select: none; font-size: 14px; padding: 0 4px; }
.logo { width: 46px; height: 28px; object-fit: contain; display: block; }
.logo-ph { width: 46px; height: 28px; display: flex; align-items: center; justify-content: center; font: 600 10px var(--mono); color: var(--subtle); border: 1px dashed var(--line); border-radius: 2px; }
/* ---------------------------------------------------------------- forms */
input, select, textarea { font: 12px var(--sans); color: var(--text); background: var(--field-bg); border: 1px solid var(--field-line); border-radius: var(--radius); padding: 6px 8px; min-height: 28px; max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
textarea { width: 100%; min-height: 70px; font-family: var(--mono); resize: vertical; }
input[type=checkbox] { min-height: 0; width: 15px; height: 15px; accent-color: var(--accent); vertical-align: middle; }
label { display: flex; flex-direction: column; gap: 4px; font: 11px var(--mono); color: var(--muted); letter-spacing: .02em; }
label.check { flex-direction: row; align-items: center; gap: 8px; font: 12px var(--sans); color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font: 11px var(--sans); color: var(--subtle); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { font: 12px var(--sans); display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; min-height: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #89917c; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--red); border-color: var(--danger-line); }
.btn.ghost { background: transparent; }
.btn.small { padding: 2px 8px; min-height: 22px; font-size: 11px; }
.btn.icon { padding: 2px 8px; }
.btn.wide { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.switch { position: relative; width: 30px; height: 16px; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 10px; cursor: pointer; transition: .15s; }
.switch span::before { content: ""; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; background: var(--muted); border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: #4d6136; }
.switch input:checked + span::before { transform: translateX(14px); background: var(--green); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { background: none; border: none; color: var(--muted); padding: 7px 12px; cursor: pointer; font: 12px var(--sans); border-bottom: 2px solid transparent; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
/* ---------------------------------------------------------------- modal & toasts */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .68); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 6vh 16px; overflow-y: auto; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; width: min(720px, 100%); padding: 16px 18px; box-shadow: 0 12px 40px #0009; }
.modal-card.wide { width: min(1100px, 100%); }
.modal-card > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-card > header h2 { font-size: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #d0dfb4; color: #1c2818; border: 1px solid #ebf2de; padding: 9px 14px; border-radius: 3px; font-size: 12px; max-width: 420px; box-shadow: 0 6px 20px #0007; animation: slide .2s; white-space: pre-wrap; }
.toast.err { background: #ffd2bd; color: #42241b; border-color: #ff9f7a; }
@keyframes slide { from { transform: translateY(10px); opacity: 0; } }
/* line icons (inline SVG, same style as the side menu) */
.i { width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i .f { fill: currentColor; stroke: none; }
.i:not(:last-child) { margin-right: .45em; }
.i:last-child:not(:first-child) { margin-left: .45em; }
.pill .i { width: 1em; height: 1em; }
.osd .i { width: 1.3em; height: 1.3em; }
td.drag .i { width: 14px; height: 14px; margin: 0; color: var(--subtle); }
/* simple alert box (e.g. sign-in errors) */
.alert { padding: 9px 12px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 3px; font-size: 12px; line-height: 1.45; background: var(--panel2); color: var(--text); }
.alert.err { border-color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--panel)); }
label.btn { display: inline-flex; flex-direction: row; align-items: center; gap: 0; }