Files
paskia/frontend/src/assets/style.css
T
2026-02-19 00:37:44 +00:00

958 lines
19 KiB
CSS

@property --hue {
syntax: '<angle>';
inherits: true;
initial-value: 0.72turn;
}
:root {
--font-sans: "Inter", "Inter var", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
--font-mono: "DM Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
--color-canvas: white;
--color-surface: white;
--color-surface-subtle: white;
--color-surface-hover: oklab(0.97 -0.01 -0.02);
--color-dialog: oklab(0.96 -0.01 -0.03);
--color-border: oklab(0.82 -0.02 -0.06);
--color-border-strong: oklab(0.55 -0.05 -0.14);
--color-heading: oklab(0.22 -0.03 -0.09);
--color-text: oklab(0.2 -0.02 -0.05);
--color-text-muted: oklab(0.42 -0.02 -0.06);
--color-link: oklab(0.5 -0.06 -0.17);
--color-link-hover: oklab(0.45 -0.06 -0.19);
--color-accent: oklab(0.55 -0.06 -0.19);
--color-accent-strong: oklab(0.45 -0.06 -0.19);
--color-accent-contrast: white;
--color-secondary: oklab(0.55 -0.02 -0.05);
--color-secondary-strong: oklab(0.45 -0.02 -0.05);
--color-success-text: oklab(0.4 -0.12 0.09);
--color-success-bg: oklab(0.95 -0.02 0.02);
--color-error-text: oklab(0.45 0.18 0.09);
--color-error-bg: oklab(0.95 0.03 0.01);
--color-info-text: oklab(0.45 -0.05 -0.14);
--color-info-bg: oklab(0.95 -0.01 -0.02);
--color-danger: oklab(0.55 0.20 0.09);
--color-primary: oklab(0.55 -0.06 -0.19);
--color-error: oklab(0.45 0.18 0.09);
--color-success: oklab(0.4 -0.12 0.09);
--color-bg: oklab(0.94 -0.01 -0.03);
--color-accent-soft: oklab(0.92 -0.03 -0.08);
--shadow-soft: 0 0 .2rem black;
--shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.15);
--radius-sm: 4px;
--radius-md: 6px;
--radius-lg: 10px;
--space-xs: 0.5rem;
--space-sm: 0.75rem;
--space-md: 1rem;
--space-lg: 1.5rem;
--space-xl: 2.25rem;
--space-3xl: 5rem;
--layout-padding: clamp(1.5rem, 3vw + 1rem, 3.25rem);
--transition-base: 160ms ease;
--focus-ring: 0 0 0 2px var(--color-accent);
}
:root.dark {
--color-canvas: oklab(0.17 -0.02 -0.05);
--color-surface: oklab(0.22 -0.02 -0.05);
--color-surface-subtle: oklab(0.25 -0.02 -0.05);
--color-surface-hover: oklab(0.28 -0.02 -0.05);
--color-dialog: oklab(0.22 -0.02 -0.05);
--color-border: oklab(0.3 -0.02 -0.05);
--color-border-strong: oklab(0.4 -0.02 -0.05);
--color-heading: white;
--color-text: oklab(0.9 0.00 -0.01);
--color-text-muted: oklab(0.7 -0.01 -0.02);
--color-link: oklab(0.7 -0.05 -0.14);
--color-link-hover: oklab(0.8 -0.04 -0.11);
--color-accent: oklab(0.7 -0.05 -0.14);
--color-accent-strong: oklab(0.6 -0.06 -0.17);
--color-accent-contrast: oklab(0.12 -0.01 -0.03);
--color-secondary: oklab(0.6 -0.02 -0.05);
--color-secondary-strong: oklab(0.5 -0.02 -0.05);
--color-success-text: oklab(0.75 -0.12 0.09);
--color-success-bg: oklab(0.3 -0.07 0.05);
--color-error-text: oklab(0.8 0.11 0.05);
--color-error-bg: oklab(0.3 0.07 0.03);
--color-info-text: oklab(0.8 -0.03 -0.10);
--color-info-bg: oklab(0.3 -0.02 -0.05);
--color-danger: oklab(0.7 0.16 0.08);
--color-primary: oklab(0.7 -0.05 -0.14);
--color-error: oklab(0.8 0.11 0.05);
--color-success: oklab(0.75 -0.12 0.09);
--color-bg: oklab(0.18 -0.01 -0.03);
--color-accent-soft: oklab(0.25 -0.03 -0.08);
--shadow-soft: 0 0 0 black;
--shadow-xl: 0 10px 40px rgba(0, 0, 0, 0.4);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
overflow: clip;
height: 100%;
background: var(--color-canvas);
}
body {
overflow: auto;
scrollbar-gutter: stable;
height: 100%;
margin: 0;
font-family: var(--font-sans);
background: none;
color: var(--color-text);
line-height: 1.55;
-webkit-font-smoothing: antialiased;
text-align: justify;
hyphens: auto;
-webkit-hyphens: auto;
-moz-hyphens: auto;
}
body,
#app,
#admin-app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
#app,
#admin-app {
flex: 1;
}
a,
a:visited {
color: var(--color-link);
text-decoration: none;
}
a:hover,
a:focus-visible {
color: var(--color-link-hover);
}
.app-shell {
flex: 1;
display: flex;
flex-direction: column;
min-height: 100vh;
}
.app-main {
flex: 1;
display: flex;
flex-direction: column;
}
.view-root {
position: relative;
flex: 1;
width: 100%;
display: flex;
flex-direction: column;
gap: 2rem;
padding: var(--layout-padding);
box-sizing: border-box;
margin: 0 auto;
}
.view-root--wide {
width: min(100%, 1200px);
}
.view-root--narrow {
max-width: 540px;
}
.view-root--profile .view-header-wrapper {
width: 100%;
max-width: calc(1200px - 2 * var(--layout-padding));
margin: 0 auto;
position: relative;
}
.view-root--profile .theme-toggle {
position: absolute;
top: 0;
right: 0;
}
.section-block--constrained {
width: 100%;
max-width: calc(1200px - 2 * var(--layout-padding));
margin: 0 auto;
}
.view-header {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.view-header h1 {
margin: 0;
font-weight: 600;
color: var(--color-heading);
}
.view-lede {
margin: 0;
color: var(--color-text-muted);
font-size: 1rem;
}
.section-block {
display: flex;
flex-direction: column;
gap: 1rem;
}
.section-block h2 {
margin: 0;
font-size: clamp(1.25rem, 1.5vw + 1rem, 1.65rem);
font-weight: 600;
color: var(--color-heading);
}
.section-body {
display: flex;
flex-direction: column;
gap: 1rem;
}
.section-description {
margin: 0;
color: var(--color-text-muted);
}
.button-row {
display: flex;
flex-wrap: nowrap;
gap: 0.75rem;
justify-content: flex-start;
width: 100%;
}
.button-row button {
min-width: 0;
}
.surface {
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
padding: var(--space-lg);
box-shadow: var(--shadow-soft);
}
.surface--tight {
padding: var(--space-md);
}
button {
font-family: inherit;
font-size: 1rem;
font-weight: 500;
border-radius: var(--radius-sm);
border: 1px solid transparent;
padding: 0.65rem 1.1rem;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
background: var(--color-surface);
color: var(--color-text);
transition: box-shadow var(--transition-base), background var(--transition-base), border-color var(--transition-base);
}
button:disabled {
cursor: not-allowed;
filter: opacity(0.6);
}
output[title="Click to copy"] {
cursor: pointer;
}
.btn-primary {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-accent);
color: var(--color-accent-contrast);
border-color: var(--color-accent);
}
.btn-primary:hover:not(:disabled),
.btn-primary:focus-visible {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-accent-strong);
border-color: var(--color-accent-strong);
box-shadow: var(--shadow-soft);
}
.btn-secondary {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-secondary);
color: var(--color-accent-contrast);
border-color: transparent;
}
.btn-secondary:hover:not(:disabled),
.btn-secondary:focus-visible {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-secondary-strong);
box-shadow: var(--shadow-soft);
}
.btn-danger {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-danger);
color: var(--color-accent-contrast);
border-color: transparent;
}
.btn-danger:hover:not(:disabled),
.btn-danger:focus-visible {
background: linear-gradient(to bottom, oklab(1 0 0 / 0.15), transparent 60%) var(--color-danger);
filter: brightness(0.92);
box-shadow: var(--shadow-soft);
}
input:not([type]),
input[type="text"],
input[type="search"],
input[type="email"],
input[type="tel"],
textarea,
select {
font: inherit;
width: 100%;
padding: 0.65rem 0.75rem;
border-radius: var(--radius-sm);
border: 1px solid var(--color-border);
background: var(--color-surface);
color: var(--color-text);
transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
input:not([type]):focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--color-accent);
box-shadow: var(--focus-ring);
}
label {
display: flex;
flex-direction: column;
gap: 0.5rem;
color: var(--color-text);
}
p {
margin: 0;
color: var(--color-text);
}
small {
color: var(--color-text-muted);
}
.table-wrapper {
overflow-x: auto;
background: var(--color-surface);
border: 1px solid var(--color-border);
}
table {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
thead tr {
background: var(--color-surface-subtle);
color: var(--color-text-muted);
}
td,
th {
padding: 0.65rem 0.75rem;
border-bottom: 1px solid var(--color-border);
text-align: left;
}
/* Permission matrix styles */
.matrix-wrapper {
margin: var(--space-md) 0;
padding: var(--space-lg);
}
.matrix-scroll {
overflow-x: auto;
}
.matrix-hint {
font-size: 0.8rem;
color: var(--color-text-muted);
}
.perm-matrix-grid {
display: inline-grid;
gap: 0.25rem;
align-items: stretch;
}
.perm-matrix-grid > * {
padding: 0.35rem 0.45rem;
font-size: 0.75rem;
}
.perm-matrix-grid .grid-head {
color: var(--color-text-muted);
text-transform: uppercase;
font-weight: 600;
letter-spacing: 0.05em;
}
.perm-matrix-grid .perm-head {
display: flex;
align-items: flex-end;
justify-content: flex-start;
padding: 0.35rem 0.45rem;
font-size: 0.75rem;
}
.perm-matrix-grid .rotated-head {
display: flex;
align-items: flex-end;
justify-content: center;
}
.perm-matrix-grid .rotated-head span {
writing-mode: vertical-rl;
transform: rotate(180deg);
font-size: 0.65rem;
}
.perm-name {
font-weight: 600;
color: var(--color-heading);
padding: 0.35rem 0.45rem;
font-size: 0.75rem;
}
.center {
text-align: center;
}
/* Utility classes */
.muted {
color: var(--color-text-muted);
}
.error {
color: var(--color-danger-text);
}
.small {
font-size: 0.9rem;
}
.icon-btn {
background: none;
border: none;
color: var(--color-text-muted);
padding: 0.2rem;
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease;
}
.icon-btn:hover {
color: var(--color-heading);
background: var(--color-surface-subtle);
}
.delete-icon {
color: var(--color-danger);
}
.delete-icon:hover {
background: var(--color-error-bg);
color: var(--color-error-text);
}
.actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-sm);
align-items: center;
}
.button-row--center {
justify-content: center;
}
.badge {
display: inline-flex;
align-items: center;
gap: 0.35rem;
padding: 0.2rem 0.6rem;
border-radius: var(--radius-sm);
background: var(--color-surface-subtle);
border: 1px solid var(--color-border);
color: var(--color-text-muted);
font-size: 0.75rem;
}
.global-status {
position: fixed;
top: 1.5rem;
left: 0;
right: 0;
margin: 0 auto;
z-index: 2000;
width: fit-content;
min-width: min(520px, calc(100% - 2rem));
max-width: calc(100% - 2rem);
display: none;
}
.global-status.show {
display: block;
}
.global-status .status {
display: flex;
align-items: center;
justify-content: center;
padding: 0.85rem 1.25rem;
border-radius: var(--radius-sm);
border-width: 1px;
border-style: solid;
background: var(--color-surface);
box-shadow: var(--shadow-soft);
font-weight: 550;
}
.status.info {
border-color: #3b82f6;
color: var(--color-info-text);
background: var(--color-info-bg);
}
.status.success {
border-color: #16a34a;
color: var(--color-success-text);
background: var(--color-success-bg);
}
.status.error {
border-color: #dc2626;
color: var(--color-error-text);
background: var(--color-error-bg);
}
.dialog-overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: transparent;
z-index: 1100;
display: flex;
align-items: center;
justify-content: center;
padding: 1.5rem;
}
.device-dialog,
.modal {
background: var(--color-dialog);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
width: min(520px, 100%);
max-height: calc(100vh - 3rem);
overflow-y: auto;
padding: 1.75rem;
box-shadow: var(--shadow-soft);
color: var(--color-text);
}
.qr-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.75rem;
text-align: center;
color: var(--color-text-muted);
}
.qr-code {
padding: 1rem;
background: white;
}
.link-container,
.token-display,
.token-info {
background: var(--color-surface-subtle);
border: 1px solid var(--color-border);
border-radius: var(--radius-sm);
padding: 0.75rem;
color: var(--color-text);
}
:root { --card-width: 16rem; }
.record-list,
.credential-list,
.session-list {
width: 100%;
display: grid;
grid-auto-flow: row;
grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
justify-content: start;
gap: 0.5rem;
align-items: stretch;
margin: 0 auto;
outline: none;
}
@media (max-width: 720px) {
.record-list { display: flex; flex-direction: column; max-width: 100%; }
}
.record-item,
.credential-item,
.session-item {
display: flex;
flex-direction: column;
padding: 0.5rem;
border-radius: var(--radius-md);
background: var(--color-surface);
height: 100%;
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
position: relative;
cursor: pointer;
}
.record-item:hover,
.credential-item:hover,
.session-item:hover {
border-color: var(--color-border-strong);
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
transform: translateY(-1px);
}
.record-item.is-current,
.credential-item.current-session,
.session-item.is-current {
border-color: var(--color-accent);
background-color: var(--color-surface-subtle);
}
.credential-item.is-hovered,
.session-item.is-hovered {
border-color: var(--color-accent);
background-color: var(--color-surface-subtle);
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
transform: translateY(-1px);
}
.credential-item.is-linked-session,
.session-item.is-linked-credential { border-color: var(--color-accent); background-color: var(--color-surface-subtle); }
.credential-item:focus,
.session-item:focus {
outline: 1px solid var(-webkit-focus-ring-color);
}
.item-top {
display: flex;
align-items: center;
height: 2.5rem;
}
.item-icon {
width: 40px;
height: 40px;
display: grid;
place-items: center;
flex-shrink: 0;
}
.auth-icon {
border-radius: var(--radius-sm);
}
.icon { flex: 0 0 auto; font-size: 1.5em; width: 40px; }
.item-title {
flex: 1;
margin: 0;
font-size: 1rem;
font-weight: 600;
color: var(--color-heading);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.item-actions {
flex-shrink: 0;
display: flex;
align-items: center;
}
.item-actions .badge + .btn-card-delete { margin-left: 0.25rem; }
.item-actions .badge + .badge { margin-left: 0.25rem; }
.item-details {
margin-left: 40px;
}
.credential-dates,
.session-dates {
display: grid;
grid-auto-flow: row;
grid-template-columns: 8em 1fr;
font-size: 0.75rem;
align-items: center;
}
.date-label {
font-weight: 500;
color: var(--color-text-muted);
overflow: hidden;
text-overflow: ellipsis;
}
.date-value {
color: var(--color-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.btn-card-delete { background: transparent; border: none; color: var(--color-danger); padding: 0.35rem 0.5rem; font-size: 1.05rem; line-height: 1; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-card-delete:hover:not(:disabled) { filter: brightness(0.85); }
.btn-card-delete:disabled { filter: opacity(0.4); cursor: not-allowed; }
.session-emoji {
font-size: 1.2rem;
}
.session-group {
position: relative;
}
.session-group:focus-visible {
outline: 1px solid var(-webkit-focus-ring-color);
}
.session-group-host {
display: flex;
align-items: center;
font-size: 1.5rem;
font-weight: 600;
margin: 0.5rem 0;
}
.session-group-icon {
margin-left: -1.5rem;
}
.session-group-host a {
color: var(--color-text);
text-decoration: none;
}
.session-group:focus-visible .session-group-host,
.session-group:focus-visible .session-group-host a {
color: var(--color-heading);
}
.btn-card-delete {
display: none;
}
.session-item:focus .btn-card-delete {
display: block;
}
.badge {
padding: 0.2rem 0.5rem;
border-radius: var(--radius-sm);
font-size: 0.8rem;
font-weight: 500;
white-space: nowrap;
}
.badge-current {
background: var(--color-accent);
color: var(--color-accent-contrast);
box-shadow: 0 0 0 1px var(--color-accent) inset;
}
.badge:not(.badge-current) {
background: var(--color-surface-subtle);
color: var(--color-text-muted);
border: 1px solid var(--color-border);
}
.session-meta-info {
font-size: 0.75rem;
color: var(--color-text-muted);
font-family: monospace;
}
.empty-state {
text-align: center;
padding: var(--space-lg);
color: var(--color-text-muted);
}
.empty-state p {
margin: 0;
}
.user-info {
display: grid;
}
.user-details {
display: grid;
grid-template-columns: 7em 1fr;
gap: 0 0.5rem;
padding-left: 40px;
font-size: 0.75rem;
}
.toggle-link {
color: var(--color-link);
cursor: pointer;
}
.toggle-link:hover {
color: var(--color-link-hover);
}
.token-info code {
font-family: var(--font-mono);
}
@media (max-width: 720px) {
.view-root {
padding: clamp(1rem, 3vw + 0.75rem, 2rem);
gap: 1.75rem;
}
.global-status {
top: 1rem;
}
}
/* Mobile portrait (touch) or very narrow screens */
@media (max-width: 500px) and (orientation: portrait) and (pointer: coarse), (max-width: 350px) {
}
.dialog-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: transparent;
backdrop-filter: blur(.2rem) brightness(0.7);
-webkit-backdrop-filter: blur(.2rem) brightness(0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.dialog-container {
max-width: 90vw;
max-height: 90vh;
overflow-y: auto;
}
.dialog-content {
flex: none;
width: 100%;
max-width: 480px;
padding: 2rem;
background: var(--color-dialog);
border-radius: var(--radius-lg);
box-shadow: 0 20px 60px #1e293b;
border: 1px solid var(--color-border);
}
.dialog-content--wide {
max-width: 540px;
}
.dialog-content--narrow {
max-width: 420px;
}
@media (max-width: 720px) {
.dialog-content {
padding: 1.5rem;
}
}
.slot-machine {
padding: 0.875rem 1rem;
background: var(--color-surface-hover);
border: 1px solid var(--color-border);
border-radius: var(--radius-sm);
font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
display: flex;
align-items: center;
user-select: none;
pointer-events: none;
white-space: nowrap;
overflow: hidden;
}
.slot-reel {
display: inline-flex;
align-items: center;
justify-content: center;
flex: 1;
min-width: 0;
height: 1.8em;
position: relative;
}
/* Spinner utilities */
.spinner {
border: 3px solid var(--color-border);
border-top-color: var(--color-primary);
border-radius: 50%;
animation: spin 1s linear infinite;
}
.spinner--sm {
width: 16px;
height: 16px;
border-width: 2px;
}
.spinner--md {
width: 40px;
height: 40px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}