890 lines
30 KiB
CSS
890 lines
30 KiB
CSS
/* ------------------------------------------------------------------
|
|
UI kit: peringatan, toast, kepala halaman, tabel, keadaan kosong,
|
|
paginasi, bilah filter, dialog konfirmasi, deret angka, meter, tab,
|
|
kolom pilihan/teks, bagian formulir, grup menu, utilitas tata letak.
|
|
Semua warna lewat token; gerak hanya opacity/transform.
|
|
------------------------------------------------------------------ */
|
|
|
|
/* ------------------------------------------------------------------
|
|
Peringatan (ui.alert)
|
|
------------------------------------------------------------------ */
|
|
|
|
.alert {
|
|
display: grid;
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
align-items: start;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-radius: var(--radius-control);
|
|
background: var(--alert-bg);
|
|
color: var(--color-ink);
|
|
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--alert-fg) 32%, transparent);
|
|
}
|
|
|
|
.alert--info { --alert-bg: var(--color-paper-2); --alert-fg: var(--color-ink-2); }
|
|
.alert--success { --alert-bg: var(--color-success-soft); --alert-fg: var(--color-success); }
|
|
.alert--warning { --alert-bg: var(--color-gold-soft); --alert-fg: var(--color-gold-ink); }
|
|
.alert--danger { --alert-bg: var(--color-error-soft); --alert-fg: var(--color-error); }
|
|
|
|
.alert__icon { width: 1.25rem; height: 1.25rem; margin-block-start: 0.15rem; color: var(--alert-fg); }
|
|
|
|
.alert__body { display: grid; gap: var(--space-3xs); min-width: 0; padding-block: var(--space-3xs); }
|
|
.alert__title { font-weight: 600; }
|
|
.alert__text { overflow-wrap: break-word; }
|
|
.alert__text > * + * { margin-block-start: var(--space-2xs); }
|
|
.alert__text a { color: inherit; font-weight: 500; }
|
|
|
|
/* Tombol tutup hanya berguna bila JS jalan; .js-only tidak bisa menimpa .btn (layer), jadi kelas sendiri */
|
|
.alert__close,
|
|
.toast__close { display: none; margin: calc(var(--space-xs) * -1) calc(var(--space-sm) * -1) calc(var(--space-xs) * -1) 0; }
|
|
.js .alert__close,
|
|
.js .toast__close { display: inline-flex; }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Toast dan pesan sesi (ui.flash)
|
|
------------------------------------------------------------------ */
|
|
|
|
/* Tanpa JS pesan tampil sebagai daftar statis di atas cangkang; setelah Alpine siap, toast mengambil alih */
|
|
.flash-static {
|
|
display: grid;
|
|
gap: var(--space-xs);
|
|
max-width: var(--container);
|
|
margin-inline: auto;
|
|
padding: var(--gutter) var(--gutter) 0;
|
|
}
|
|
|
|
.toasts-ready .flash-static { display: none; }
|
|
|
|
.toasts {
|
|
position: fixed;
|
|
inset-inline: var(--gutter);
|
|
inset-block-end: var(--gutter);
|
|
z-index: var(--z-toast);
|
|
display: grid;
|
|
justify-items: end;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.toasts__stack { display: flex; flex-direction: column; width: 100%; }
|
|
|
|
@media (width >= 40rem) {
|
|
.toasts { inset-inline-start: auto; width: min(26rem, calc(100% - 2 * var(--gutter))); }
|
|
}
|
|
|
|
.toast {
|
|
pointer-events: auto;
|
|
display: grid;
|
|
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
align-items: start;
|
|
gap: var(--space-sm);
|
|
margin-block-start: var(--space-xs);
|
|
padding: var(--space-sm) var(--space-md);
|
|
border-radius: var(--radius-control);
|
|
background: var(--color-surface);
|
|
color: var(--color-ink);
|
|
box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--toast-fg) 40%, transparent), var(--shadow-glass);
|
|
animation: toast-in var(--dur-short) var(--ease-out);
|
|
}
|
|
|
|
.toast--info { --toast-fg: var(--color-ink-2); }
|
|
.toast--success { --toast-fg: var(--color-success); }
|
|
.toast--warning { --toast-fg: var(--color-gold-ink); }
|
|
.toast--danger { --toast-fg: var(--color-error); }
|
|
|
|
.toast__icon { display: grid; margin-block-start: 0.15rem; color: var(--toast-fg); }
|
|
.toast__icon svg { width: 1.25rem; height: 1.25rem; }
|
|
.toast__message { padding-block: var(--space-3xs); overflow-wrap: break-word; min-width: 0; }
|
|
|
|
.toast--leave { transition: opacity var(--dur-short) var(--ease-in), transform var(--dur-short) var(--ease-in); }
|
|
.toast--leave-from { opacity: 1; transform: none; }
|
|
.toast--leave-to { opacity: 0; transform: translateY(0.5rem); }
|
|
|
|
@keyframes toast-in {
|
|
from { opacity: 0; transform: translateY(0.75rem); }
|
|
to { opacity: 1; transform: none; }
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.toast { animation: none; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Kepala halaman (ui.page-header)
|
|
------------------------------------------------------------------ */
|
|
|
|
.page-header { display: grid; gap: var(--space-sm); margin-block-end: var(--space-lg); min-width: 0; }
|
|
|
|
.page-header__row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: flex-end;
|
|
justify-content: space-between;
|
|
gap: var(--space-md) var(--space-lg);
|
|
}
|
|
|
|
.page-header__text { display: grid; flex: 1 1 22rem; gap: var(--space-xs); min-width: 0; }
|
|
|
|
.page-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
|
|
|
|
.crumbs { display: flex; flex-wrap: wrap; align-items: center; font-size: var(--text-sm); color: var(--color-muted); }
|
|
|
|
.crumbs__item { display: inline-flex; align-items: center; min-height: 1.75rem; }
|
|
.crumbs__item a { color: var(--color-ink-2); text-decoration: none; border-radius: var(--radius-control); }
|
|
|
|
@media (hover: hover) {
|
|
.crumbs__item a:hover { color: var(--color-ink); text-decoration: underline; }
|
|
}
|
|
|
|
.crumbs__item [aria-current="page"] { color: var(--color-ink); font-weight: 500; overflow-wrap: anywhere; }
|
|
.crumbs__sep { width: 1rem; height: 1rem; margin-inline: var(--space-3xs); flex-shrink: 0; }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Tabel (ui.table + table.table)
|
|
------------------------------------------------------------------ */
|
|
|
|
.table-wrap {
|
|
max-width: 100%;
|
|
overflow-x: auto;
|
|
overscroll-behavior-x: contain;
|
|
border-radius: inherit;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--color-edge) transparent;
|
|
}
|
|
|
|
.table-wrap:focus-visible { outline-offset: -2px; }
|
|
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.table th,
|
|
.table td {
|
|
padding: var(--space-sm) var(--space-md);
|
|
text-align: start;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.table th {
|
|
border-block-end: var(--rule-hair) solid var(--color-rule);
|
|
color: var(--color-muted);
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
line-height: 1.3;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.table td { line-height: 1.45; overflow-wrap: break-word; }
|
|
|
|
.table tbody tr + tr > * { border-block-start: var(--rule-hair) solid var(--color-rule); }
|
|
|
|
@media (hover: hover) {
|
|
.table tbody tr:hover { background: color-mix(in oklab, var(--color-ink) 4%, transparent); }
|
|
}
|
|
|
|
.table--compact th,
|
|
.table--compact td { padding: var(--space-xs) var(--space-sm); }
|
|
.table--compact td { font-size: var(--text-sm); }
|
|
|
|
.table .num,
|
|
.table__num { text-align: end; font-variant-numeric: tabular-nums; }
|
|
|
|
.table__title { font-weight: 500; color: var(--color-ink); }
|
|
.table__meta { font-size: var(--text-sm); color: var(--color-muted); }
|
|
|
|
/* Kolom aksi: sel rata kanan berisi tombol ikon (ghost, icon-only) */
|
|
.table__actions { width: 1%; text-align: end; white-space: nowrap; }
|
|
.table__actions > * { vertical-align: middle; }
|
|
.table__actions > * + * { margin-inline-start: var(--space-3xs); }
|
|
.table td.table__actions { padding-block: var(--space-2xs); }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Keadaan kosong (ui.empty)
|
|
------------------------------------------------------------------ */
|
|
|
|
.empty {
|
|
display: grid;
|
|
justify-items: center;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-xl) var(--space-md);
|
|
text-align: center;
|
|
}
|
|
|
|
.empty__icon { display: grid; place-items: center; margin-block-end: var(--space-2xs); color: var(--color-muted); }
|
|
.empty__icon svg { width: 2.5rem; height: 2.5rem; }
|
|
.empty__title { font-family: var(--font-display); font-size: var(--text-title); font-weight: 500; }
|
|
.empty__text { max-width: 46ch; color: var(--color-ink-2); }
|
|
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-xs); margin-block-start: var(--space-xs); }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Paginasi (pagination/siakad.blade.php)
|
|
------------------------------------------------------------------ */
|
|
|
|
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); }
|
|
|
|
.pager__summary { flex: 1 1 14rem; font-size: var(--text-sm); color: var(--color-muted); }
|
|
|
|
.pager__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2xs); }
|
|
|
|
.pager__link {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-2xs);
|
|
min-width: 2.75rem;
|
|
min-height: 2.75rem;
|
|
padding-inline: var(--space-sm);
|
|
border-radius: var(--radius-control);
|
|
color: var(--color-ink-2);
|
|
font-weight: 500;
|
|
font-variant-numeric: tabular-nums;
|
|
text-decoration: none;
|
|
transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
|
|
}
|
|
|
|
.pager__link svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
|
|
|
|
@media (hover: hover) {
|
|
a.pager__link:hover { background: color-mix(in oklab, var(--color-ink) 7%, transparent); color: var(--color-ink); }
|
|
}
|
|
|
|
a.pager__link:active { background: color-mix(in oklab, var(--color-ink) 12%, transparent); }
|
|
|
|
.pager__link[aria-current="page"] { background: var(--color-accent-soft); color: var(--color-accent-text); }
|
|
|
|
.pager__link[aria-disabled="true"] { color: var(--color-muted); opacity: 0.6; cursor: not-allowed; }
|
|
|
|
.pager__gap { display: inline-grid; place-items: center; min-width: 2rem; min-height: 2.75rem; color: var(--color-muted); }
|
|
|
|
/* Di layar sempit hanya sebelumnya/berikutnya dan posisi halaman */
|
|
.pager__page { display: none; }
|
|
.pager__status { display: inline-flex; align-items: center; padding-inline: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
|
|
|
|
@media (width >= 40rem) {
|
|
.pager__page { display: list-item; }
|
|
.pager__status { display: none; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Bilah filter (ui.filter-bar)
|
|
------------------------------------------------------------------ */
|
|
|
|
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm); }
|
|
|
|
.filter-bar__search { flex: 1 1 16rem; min-width: 0; }
|
|
.filter-bar > .field:not(.filter-bar__search) { flex: 1 1 12rem; min-width: 9rem; }
|
|
.filter-bar__actions { margin-inline-start: auto; }
|
|
|
|
/* Baris bantuan kolom tidak berguna di bilah yang padat; galat tetap tampil */
|
|
.filter-bar .field__help:not(.field__help--error) { display: none; }
|
|
|
|
.filter-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
|
|
|
|
.field__icon {
|
|
position: absolute;
|
|
inset-block: 0;
|
|
inset-inline-start: var(--space-sm);
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--color-muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.field__icon svg { width: 1.25rem; height: 1.25rem; }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Dialog konfirmasi (ui.confirm)
|
|
------------------------------------------------------------------ */
|
|
|
|
.confirm { display: inline-flex; }
|
|
|
|
.confirm__trigger--danger { color: var(--color-error); }
|
|
|
|
@media (hover: hover) {
|
|
.confirm__trigger--danger:hover { color: var(--color-error); background: var(--color-error-soft); }
|
|
}
|
|
|
|
.dialog {
|
|
margin: auto;
|
|
width: min(28rem, calc(100% - 2 * var(--gutter)));
|
|
max-height: calc(100dvh - 2 * var(--gutter));
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: var(--radius-card);
|
|
background: var(--color-surface);
|
|
color: var(--color-ink);
|
|
box-shadow: var(--glass-edge), var(--glass-ring), var(--shadow-glass);
|
|
overflow: auto;
|
|
|
|
/* Tutup: memudar dan turun sedikit. display/overlay (allow-discrete) menahan dialog tetap tampil sampai selesai. */
|
|
opacity: 0;
|
|
transform: translateY(0.75rem) scale(0.98);
|
|
transition:
|
|
opacity var(--dur-short) var(--ease-in),
|
|
transform var(--dur-short) var(--ease-in),
|
|
overlay var(--dur-short) allow-discrete,
|
|
display var(--dur-short) allow-discrete;
|
|
}
|
|
|
|
.dialog::backdrop {
|
|
background: var(--color-scrim);
|
|
opacity: 0;
|
|
transition:
|
|
opacity var(--dur-short) var(--ease-in),
|
|
overlay var(--dur-short) allow-discrete,
|
|
display var(--dur-short) allow-discrete;
|
|
}
|
|
|
|
/* Buka: naik dan menampak pelan */
|
|
.dialog[open] {
|
|
opacity: 1;
|
|
transform: none;
|
|
transition:
|
|
opacity var(--dur-short) var(--ease-out),
|
|
transform var(--dur-short) var(--ease-out),
|
|
overlay var(--dur-short) allow-discrete,
|
|
display var(--dur-short) allow-discrete;
|
|
}
|
|
|
|
.dialog[open]::backdrop {
|
|
opacity: 1;
|
|
transition:
|
|
opacity var(--dur-short) var(--ease-out),
|
|
overlay var(--dur-short) allow-discrete,
|
|
display var(--dur-short) allow-discrete;
|
|
}
|
|
|
|
@starting-style {
|
|
.dialog[open] { opacity: 0; transform: translateY(0.75rem) scale(0.98); }
|
|
.dialog[open]::backdrop { opacity: 0; }
|
|
}
|
|
|
|
/* Peramban tanpa transisi diskret: dialog tetap terbuka dengan animasi masuk saja */
|
|
@supports not (transition-behavior: allow-discrete) {
|
|
.dialog { transition: none; }
|
|
.dialog::backdrop { transition: none; }
|
|
.dialog[open] { opacity: 1; transform: none; animation: dialog-in var(--dur-short) var(--ease-out); }
|
|
.dialog[open]::backdrop { opacity: 1; animation: fade-in var(--dur-short) var(--ease-out); }
|
|
}
|
|
|
|
/* Dialog berisi pilihan Select2: dropdown ikut di dalam dialog (lapisan atas), jadi harus boleh keluar dari tepinya */
|
|
.dialog:has(select.field__select) { overflow: visible; }
|
|
|
|
@media (max-height: 36rem) {
|
|
.dialog:has(select.field__select) { overflow: auto; }
|
|
}
|
|
|
|
/* Susunan modal: header (ikon, judul, tombol tutup), isi, footer (tombol aksi). Header dan footer selebar dialog. */
|
|
.dialog__body { display: grid; }
|
|
|
|
.dialog__body > :not(.dialog__head, .dialog__actions) { padding: var(--space-md) var(--space-lg); }
|
|
|
|
/*
|
|
* Semua dialog: header dan footer tetap terlihat, hanya isinya yang bergulir (bilah gulir tipis). Dropdown Select2
|
|
* menempel di elemen dialog (bukan di isi), jadi tidak terpotong oleh isi yang bergulir; dialog ber-Select2 tetap
|
|
* overflow visible (aturan di atas) agar dropdown boleh keluar dari tepi dialog.
|
|
*/
|
|
.dialog:not(:has(select.field__select)) { overflow: hidden; }
|
|
.dialog__body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-height: calc(100dvh - 2 * var(--gutter));
|
|
}
|
|
.dialog__body > .dialog__head,
|
|
.dialog__body > .dialog__actions { flex-shrink: 0; }
|
|
.dialog__body > :not(.dialog__head, .dialog__actions) {
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
overflow: auto;
|
|
overscroll-behavior: contain;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--color-rule) transparent;
|
|
}
|
|
.dialog__body > :not(.dialog__head, .dialog__actions)::-webkit-scrollbar { width: 0.375rem; height: 0.375rem; }
|
|
.dialog__body > :not(.dialog__head, .dialog__actions)::-webkit-scrollbar-thumb { background: var(--color-rule); border-radius: var(--radius-pill); }
|
|
.dialog__body > :not(.dialog__head, .dialog__actions)::-webkit-scrollbar-track { background: transparent; }
|
|
|
|
.dialog__head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-lg);
|
|
/* Header berwarna tema (aksen); teks, ikon, dan tombol tutup memakai accent-ink agar kontras tetap terjaga */
|
|
background: var(--color-accent);
|
|
color: var(--color-accent-ink);
|
|
border-start-start-radius: var(--radius-card);
|
|
border-start-end-radius: var(--radius-card);
|
|
}
|
|
|
|
.dialog__icon { display: grid; flex-shrink: 0; place-items: center; color: inherit; }
|
|
.dialog__icon svg { width: 1.5rem; height: 1.5rem; }
|
|
|
|
.dialog__title { font-family: var(--font-display); font-size: var(--text-title); font-weight: 500; line-height: 1.3; }
|
|
.dialog__close { flex-shrink: 0; margin-inline-start: auto; }
|
|
.dialog__head .dialog__close { color: var(--color-accent-ink); }
|
|
.dialog__head .dialog__close:focus-visible { outline-color: var(--color-accent-ink); }
|
|
|
|
@media (hover: hover) {
|
|
.dialog__head .dialog__close:hover { background: color-mix(in oklab, var(--color-accent-ink) 18%, transparent); color: var(--color-accent-ink); }
|
|
}
|
|
|
|
.dialog__head .dialog__close:active { background: color-mix(in oklab, var(--color-accent-ink) 26%, transparent); }
|
|
|
|
@media (forced-colors: active) {
|
|
.dialog__head { background: Canvas; color: CanvasText; border-block-end: 1px solid CanvasText; }
|
|
.dialog__head .dialog__close { color: ButtonText; }
|
|
}
|
|
.dialog__message { color: var(--color-ink-2); }
|
|
|
|
/* Footer: kelompok tombol di tepi kanan; tombol aksi di kiri, tombol batal di kanan kelompok */
|
|
.dialog__actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-end;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-sm) var(--space-lg);
|
|
background: var(--color-paper);
|
|
border-block-start: 1px solid var(--color-rule);
|
|
border-end-start-radius: var(--radius-card);
|
|
border-end-end-radius: var(--radius-card);
|
|
}
|
|
|
|
html:has(dialog.dialog[open]) { overflow-y: clip; }
|
|
|
|
@keyframes dialog-in {
|
|
from { opacity: 0; transform: translateY(0.75rem); }
|
|
to { opacity: 1; transform: none; }
|
|
}
|
|
|
|
@keyframes fade-in {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.dialog, .dialog::backdrop { transition: none; transform: none; }
|
|
.dialog[open], .dialog[open]::backdrop { animation: none; }
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.dialog { border: 1px solid CanvasText; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Deret angka (ui.figures, ui.figure): satu panel kaca, pemisah hairline
|
|
------------------------------------------------------------------ */
|
|
|
|
.figures {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
|
|
overflow: clip;
|
|
border-radius: inherit;
|
|
}
|
|
|
|
.figure {
|
|
position: relative;
|
|
display: grid;
|
|
align-content: start;
|
|
gap: var(--space-2xs);
|
|
min-width: 0;
|
|
padding: var(--space-md) var(--space-lg);
|
|
/* Garis kiri dan atas tiap sel; yang berada di tepi luar terpotong oleh overflow pada .figures */
|
|
box-shadow: -1px 0 0 0 var(--color-rule), 0 -1px 0 0 var(--color-rule);
|
|
}
|
|
|
|
.figure__label { font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
|
|
|
|
.figure__link { color: inherit; text-decoration: none; }
|
|
|
|
/* Seluruh sel menjadi area tautan */
|
|
.figure__link::after { content: ""; position: absolute; inset: 0; }
|
|
.figure__link:focus-visible { outline: none; }
|
|
.figure__link:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: -4px; border-radius: var(--radius-control); }
|
|
|
|
@media (hover: hover) {
|
|
.figure:has(.figure__link):hover { background: color-mix(in oklab, var(--color-ink) 4%, transparent); }
|
|
}
|
|
|
|
.figure__value {
|
|
font-family: var(--font-display);
|
|
font-size: var(--text-3xl);
|
|
font-weight: 500;
|
|
line-height: 1.1;
|
|
letter-spacing: var(--tracking-display);
|
|
font-variant-numeric: tabular-nums;
|
|
overflow-wrap: anywhere;
|
|
}
|
|
|
|
.figure__hint { font-size: var(--text-sm); color: var(--color-muted); }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Meter (ui.meter)
|
|
------------------------------------------------------------------ */
|
|
|
|
.meter { display: grid; gap: var(--space-xs); }
|
|
|
|
.meter__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-sm); }
|
|
.meter__label { font-weight: 500; color: var(--color-ink); }
|
|
.meter__text { color: var(--color-ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
|
|
.meter__track {
|
|
height: 0.5rem;
|
|
overflow: clip;
|
|
border-radius: var(--radius-pill);
|
|
background: var(--color-paper-3);
|
|
}
|
|
|
|
/* Isi memakai skala (bukan lebar) agar tidak memicu tata letak ulang */
|
|
.meter__fill {
|
|
height: 100%;
|
|
border-radius: inherit;
|
|
background: var(--meter-fill, var(--color-ink-2));
|
|
transform: scaleX(var(--meter-ratio, 0));
|
|
transform-origin: left center;
|
|
}
|
|
|
|
.meter--success { --meter-fill: var(--color-success); }
|
|
.meter--danger { --meter-fill: var(--color-error); }
|
|
.meter--accent { --meter-fill: var(--color-accent); }
|
|
|
|
[dir="rtl"] .meter__fill { transform-origin: right center; }
|
|
|
|
/* Muat di tempat mengganti --meter-ratio: isi bergeser ke nilai baru */
|
|
@media (prefers-reduced-motion: no-preference) {
|
|
.meter__fill { transition: transform 700ms var(--ease-out); }
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.meter__track { border: 1px solid CanvasText; }
|
|
.meter__fill { background: Highlight; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Tab berbasis tautan (ui.tabs, ui.tab)
|
|
------------------------------------------------------------------ */
|
|
|
|
.tabs { min-width: 0; max-width: 100%; border-block-end: var(--rule-hair) solid var(--color-rule); }
|
|
|
|
.tabs__list {
|
|
display: flex;
|
|
gap: var(--space-2xs);
|
|
overflow-x: auto;
|
|
overscroll-behavior-x: contain;
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.tabs__list::-webkit-scrollbar { display: none; }
|
|
|
|
.tab {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
flex-shrink: 0;
|
|
min-height: 2.75rem;
|
|
padding-inline: var(--space-md);
|
|
color: var(--color-ink-2);
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
text-decoration: none;
|
|
transition: color var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out);
|
|
}
|
|
|
|
.tab:focus-visible { outline-offset: -3px; }
|
|
|
|
@media (hover: hover) {
|
|
.tab:hover { color: var(--color-ink); background: color-mix(in oklab, var(--color-ink) 5%, transparent); }
|
|
}
|
|
|
|
.tab[aria-current="page"] {
|
|
color: var(--color-accent-text);
|
|
box-shadow: inset 0 -2px 0 var(--color-accent);
|
|
}
|
|
|
|
@media (forced-colors: active) {
|
|
.tab[aria-current="page"] { border-block-end: 2px solid Highlight; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Formulir lanjutan: select, textarea, tipe tanggal/angka, prefiks dan sufiks
|
|
------------------------------------------------------------------ */
|
|
|
|
.field__input { padding-inline-start: var(--pad-start, var(--space-md)); padding-inline-end: var(--pad-end, var(--space-md)); }
|
|
.field__input--password { padding-inline-end: 3rem; }
|
|
|
|
.field__input[type="date"],
|
|
.field__input[type="time"],
|
|
.field__input[type="month"],
|
|
.field__input[type="datetime-local"] {
|
|
min-width: 0;
|
|
appearance: none;
|
|
-webkit-appearance: none;
|
|
text-align: start;
|
|
}
|
|
|
|
.field__input::-webkit-calendar-picker-indicator { cursor: pointer; }
|
|
|
|
.field__input[type="number"] { font-variant-numeric: tabular-nums; }
|
|
|
|
.field__select { appearance: none; -webkit-appearance: none; padding-inline-end: 3rem; cursor: pointer; text-overflow: ellipsis; }
|
|
.field__select:disabled { cursor: not-allowed; }
|
|
|
|
.field__chevron {
|
|
position: absolute;
|
|
inset-block: 0;
|
|
inset-inline-end: var(--space-sm);
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--color-muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.field__chevron svg { width: 1.25rem; height: 1.25rem; }
|
|
|
|
.field__textarea {
|
|
min-height: calc(var(--control-h) * 2);
|
|
padding-block: var(--space-sm);
|
|
line-height: 1.5;
|
|
resize: vertical;
|
|
}
|
|
|
|
.field__affix {
|
|
position: absolute;
|
|
inset-block: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--color-muted);
|
|
pointer-events: none;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.field__affix--start { inset-inline-start: var(--space-md); }
|
|
.field__affix--end { inset-inline-end: var(--space-md); }
|
|
|
|
.form-section { min-width: 0; margin: 0; padding: 0; border: 0; }
|
|
|
|
.form-section + .form-section,
|
|
.form-section + .form-actions { margin-block-start: var(--space-lg); padding-block-start: var(--space-lg); border-block-start: var(--rule-hair) solid var(--color-rule); }
|
|
|
|
/* legend sulit di-grid-kan; float membuatnya berperilaku seperti blok biasa */
|
|
.form-section__title {
|
|
float: inline-start;
|
|
width: 100%;
|
|
padding: 0;
|
|
font-family: var(--font-display);
|
|
font-size: var(--text-title);
|
|
font-weight: 500;
|
|
line-height: 1.3;
|
|
letter-spacing: var(--tracking-display);
|
|
}
|
|
|
|
.form-section__title + * { clear: both; }
|
|
|
|
.form-section__desc { margin-block-start: var(--space-3xs); max-width: 60ch; color: var(--color-ink-2); }
|
|
|
|
.form-section__body { container-type: inline-size; margin-block-start: var(--space-md); }
|
|
|
|
.form-section__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs) var(--space-md); }
|
|
|
|
@container (width >= 36rem) {
|
|
.form-section__grid--2,
|
|
.form-section__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
}
|
|
|
|
@container (width >= 52rem) {
|
|
.form-section__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: var(--space-xs);
|
|
margin-block-start: var(--space-lg);
|
|
}
|
|
|
|
@media (width < 40rem) {
|
|
.form-actions { flex-direction: column; align-items: stretch; }
|
|
.form-actions .btn { width: 100%; }
|
|
}
|
|
|
|
/* ------------------------------------------------------------------
|
|
Grup menu (nav.group) dan penghitung butir menu
|
|
------------------------------------------------------------------ */
|
|
|
|
.nav-group > summary {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
min-height: 2.75rem;
|
|
padding: 0 var(--space-sm);
|
|
border-radius: var(--radius-control);
|
|
color: var(--color-ink-2);
|
|
font-weight: 500;
|
|
list-style: none;
|
|
cursor: pointer;
|
|
transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
|
|
}
|
|
|
|
.nav-group > summary::-webkit-details-marker { display: none; }
|
|
|
|
.nav-group__label { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
|
|
|
|
@media (hover: hover) {
|
|
.nav-group > summary:hover { background: color-mix(in oklab, var(--color-ink) 6%, transparent); color: var(--color-ink); }
|
|
}
|
|
|
|
.nav-group > summary:active { background: color-mix(in oklab, var(--color-ink) 10%, transparent); }
|
|
|
|
.nav-group[data-has-active] > summary { color: var(--color-ink); }
|
|
|
|
.nav-group__chevron {
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
flex-shrink: 0;
|
|
color: var(--color-muted);
|
|
transition: transform 440ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
}
|
|
|
|
.nav-group[open]:not([data-closing]) > summary .nav-group__chevron { transform: rotate(180deg); }
|
|
|
|
.nav-group__items {
|
|
display: grid;
|
|
gap: var(--space-2xs);
|
|
margin-block-start: var(--space-2xs);
|
|
margin-inline-start: calc(var(--space-sm) + 0.6875rem);
|
|
padding-inline-start: var(--space-sm);
|
|
border-inline-start: var(--rule-hair) solid var(--color-rule);
|
|
}
|
|
|
|
.nav-item__count {
|
|
margin-inline-start: auto;
|
|
min-width: 1.5rem;
|
|
padding: 0 var(--space-xs);
|
|
border-radius: var(--radius-pill);
|
|
background: var(--color-gold-soft);
|
|
color: var(--color-gold-ink);
|
|
font-size: var(--text-sm);
|
|
font-weight: 600;
|
|
line-height: 1.5rem;
|
|
text-align: center;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
/* Menu panjang: daftar menu yang menggulir, kepala dan kaki sidebar tetap */
|
|
.sidebar { min-height: 0; }
|
|
|
|
.sidebar__nav {
|
|
flex: 0 1 auto;
|
|
align-content: start;
|
|
min-height: 0;
|
|
margin: calc(var(--space-2xs) * -1);
|
|
padding: var(--space-2xs);
|
|
grid-template-columns: minmax(0, 1fr);
|
|
overflow-x: hidden;
|
|
overflow-y: auto;
|
|
overscroll-behavior: contain;
|
|
scrollbar-width: thin;
|
|
scrollbar-color: var(--color-edge) transparent;
|
|
}
|
|
|
|
.sidebar__head,
|
|
.sidebar__foot { flex-shrink: 0; }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Daftar identitas lebar, panel bagian, dan utilitas tata letak
|
|
------------------------------------------------------------------ */
|
|
|
|
@container (width >= 28rem) {
|
|
.ledger--wide .ledger__row { grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); }
|
|
}
|
|
|
|
/* Bagian di dalam glass.panel padding="none": kepala (judul/filter), isi (tabel), kaki (paginasi) */
|
|
.panel__head,
|
|
.panel__foot {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm) var(--space-md);
|
|
padding: var(--space-md);
|
|
}
|
|
|
|
.panel__head > .filter-bar,
|
|
.panel__foot > .pager { flex: 1 1 100%; }
|
|
|
|
.panel__head { border-block-end: var(--rule-hair) solid var(--color-rule); }
|
|
.panel__foot { border-block-start: var(--rule-hair) solid var(--color-rule); }
|
|
|
|
@media (width >= 40rem) {
|
|
.panel__head, .panel__foot { padding: var(--space-md) var(--space-lg); }
|
|
}
|
|
|
|
.panel__title { font-size: var(--text-title); line-height: 1.3; }
|
|
|
|
.stack { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--stack-gap, var(--space-md)); min-width: 0; }
|
|
.stack--sm { --stack-gap: var(--space-xs); }
|
|
.stack--lg { --stack-gap: var(--space-lg); }
|
|
.stack--xl { --stack-gap: var(--space-xl); }
|
|
|
|
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-sm)); min-width: 0; }
|
|
.cluster--sm { --cluster-gap: var(--space-xs); }
|
|
.cluster--end { justify-content: flex-end; }
|
|
.cluster--between { justify-content: space-between; }
|
|
|
|
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); min-width: 0; }
|
|
|
|
.truncate-2 {
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
-webkit-line-clamp: 2;
|
|
line-clamp: 2;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Teks panjang (pengumuman, deskripsi): ukuran baris nyaman dibaca */
|
|
.prose-id { max-width: 68ch; line-height: 1.7; overflow-wrap: break-word; }
|
|
.prose-id > * + * { margin-block-start: 1em; }
|
|
.prose-id p:not([class]) { max-width: none; }
|
|
.prose-id h2, .prose-id h3 { margin-block-start: 1.6em; }
|
|
.prose-id h2 + *, .prose-id h3 + * { margin-block-start: 0.5em; }
|
|
.prose-id ul { list-style: disc; padding-inline-start: 1.25rem; }
|
|
.prose-id ol { list-style: decimal; padding-inline-start: 1.25rem; }
|
|
.prose-id li + li { margin-block-start: 0.35em; }
|
|
.prose-id a { color: var(--color-accent-text); }
|
|
.prose-id strong { font-weight: 600; }
|
|
|
|
/* ------------------------------------------------------------------
|
|
Daftar peran di halaman masuk (portal): baris bergaris, bukan kartu
|
|
------------------------------------------------------------------ */
|
|
|
|
.role-list { display: grid; }
|
|
.role-list li + li { border-block-start: var(--rule-hair) solid var(--color-rule); }
|
|
|
|
.role-link {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
min-height: 3.5rem;
|
|
padding: var(--space-xs) var(--space-xs);
|
|
border-radius: var(--radius-control);
|
|
color: var(--color-ink);
|
|
text-decoration: none;
|
|
transition: background-color var(--dur-micro) var(--ease-out);
|
|
}
|
|
|
|
@media (hover: hover) {
|
|
.role-link:hover { background: color-mix(in oklab, var(--color-ink) 5%, transparent); }
|
|
}
|
|
|
|
.role-link__icon { display: grid; flex-shrink: 0; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-control); background: var(--color-paper-2); color: var(--color-ink-2); }
|
|
.role-link__icon svg { width: 1.375rem; height: 1.375rem; }
|
|
.role-link__text { display: grid; flex: 1 1 auto; min-width: 0; line-height: 1.35; }
|
|
.role-link__name { font-weight: 600; }
|
|
.role-link__desc { font-size: var(--text-sm); color: var(--color-ink-2); }
|
|
.role-link__chevron { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--color-muted); }
|
|
|
|
@media (width < 40rem) {
|
|
.table th, .table td { padding-inline: var(--space-sm); }
|
|
}
|