168 lines
3.4 KiB
CSS
168 lines
3.4 KiB
CSS
/* reusable building blocks: tables, badges, pagination, dialogs, toasts */
|
|
|
|
|
|
/* ── table ── */
|
|
|
|
.table-wrap {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
overflow: hidden;
|
|
}
|
|
|
|
table { width: 100%; border-collapse: collapse; }
|
|
|
|
th {
|
|
text-align: left;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border);
|
|
color: var(--muted-dark);
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: .06em;
|
|
font-weight: 600;
|
|
background: var(--bg-subtle);
|
|
}
|
|
|
|
td {
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border-light);
|
|
vertical-align: middle;
|
|
}
|
|
|
|
tr:last-child td { border-bottom: none; }
|
|
|
|
tr:hover td { background: rgba(255,255,255,.02); }
|
|
|
|
|
|
/* ── truncate ── */
|
|
|
|
.truncate {
|
|
max-width: 280px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
display: block;
|
|
}
|
|
|
|
|
|
/* ── badges ── */
|
|
|
|
.badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: .03em;
|
|
}
|
|
|
|
.badge.ok { background: rgba(20, 83, 45, .5); color: #86efac; border: 1px solid rgba(134,239,172,.15); }
|
|
.badge.err { background: rgba(127, 29, 29, .5); color: #fca5a5; border: 1px solid rgba(252,165,165,.15); }
|
|
.badge.pending { background: rgba(30, 58, 95, .5); color: #93c5fd; border: 1px solid rgba(147,197,253,.15); }
|
|
.badge.null { background: rgba(30, 41, 59, .7); color: #64748b; border: 1px solid var(--border); }
|
|
|
|
|
|
/* ── pagination ── */
|
|
|
|
.pagination {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
margin-top: 14px;
|
|
color: var(--muted-dark);
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.pagination button { font-size: 12px; padding: 5px 12px; }
|
|
|
|
|
|
/* ── overlay / dialog ── */
|
|
|
|
.overlay {
|
|
display: none;
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(2, 8, 23, .75);
|
|
backdrop-filter: blur(4px);
|
|
z-index: 100;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.overlay.open { display: flex; }
|
|
|
|
.modal {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
padding: 28px;
|
|
width: 680px;
|
|
max-width: 95vw;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
|
|
}
|
|
|
|
.modal h2 {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin-bottom: 6px;
|
|
letter-spacing: -.01em;
|
|
}
|
|
|
|
.modal-divider {
|
|
height: 1px;
|
|
background: var(--border);
|
|
margin: 16px -28px;
|
|
}
|
|
|
|
.field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
|
|
|
|
.field label {
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: var(--muted);
|
|
text-transform: uppercase;
|
|
letter-spacing: .05em;
|
|
}
|
|
|
|
.field input[type="text"],
|
|
.field textarea,
|
|
.field select { width: 100%; min-width: unset; }
|
|
|
|
.modal-footer {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
margin-top: 20px;
|
|
padding-top: 16px;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
|
|
/* ── toast ── */
|
|
|
|
#toast {
|
|
position: fixed;
|
|
bottom: 24px;
|
|
right: 24px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
color: var(--foreground);
|
|
padding: 10px 16px;
|
|
border-radius: var(--radius);
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
display: none;
|
|
z-index: 200;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,.4);
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
#toast.show { display: flex; }
|
|
#toast .toast-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
|
|
#toast.error .toast-dot { background: #ef4444; }
|