pinakes/crates/pinakes-ui/src/styles.rs
NotAShelf 80a8b5c7ca
various: markdown improvements
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I81fda8247814da19eed1e76dbe97bd5b6a6a6964
2026-02-09 15:49:23 +03:00

3631 lines
70 KiB
Rust

pub const CSS: &str = r#"
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg-0: #111118;
--bg-1: #18181f;
--bg-2: #1f1f28;
--bg-3: #26263a;
--border-subtle: rgba(255, 255, 255, 0.06);
--border: rgba(255, 255, 255, 0.09);
--border-strong: rgba(255, 255, 255, 0.14);
--text-0: #dcdce4;
--text-1: #a0a0b8;
--text-2: #6c6c84;
--accent: #7c7ef5;
--accent-dim: rgba(124, 126, 245, 0.15);
--accent-text: #9698f7;
--success: #3ec97a;
--error: #e45858;
--warning: #d4a037;
--radius-sm: 3px;
--radius: 5px;
--radius-md: 7px;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
--shadow: 0 2px 8px rgba(0,0,0,0.35);
--shadow-lg: 0 4px 20px rgba(0,0,0,0.45);
}
body {
font-family: 'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
background: var(--bg-0);
color: var(--text-0);
font-size: 13px;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
overflow: hidden;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* ── Layout ── */
.app {
display: flex;
height: 100vh;
overflow: hidden;
}
.sidebar {
width: 220px;
min-width: 220px;
max-width: 220px;
background: var(--bg-1);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
user-select: none;
overflow-y: auto;
overflow-x: hidden;
z-index: 10;
transition: width 0.15s, min-width 0.15s, max-width 0.15s;
}
.sidebar.collapsed { width: 48px; min-width: 48px; max-width: 48px; }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-header .logo,
.sidebar.collapsed .sidebar-header .version,
.sidebar.collapsed .nav-badge { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 8px; border-left: none; border-radius: var(--radius-sm); }
.sidebar.collapsed .nav-item.active { border-left: none; }
.sidebar.collapsed .nav-icon { width: auto; margin: 0; }
.sidebar.collapsed .sidebar-header { padding: 12px 8px; justify-content: center; }
.sidebar.collapsed .nav-section { padding: 0 4px; }
.sidebar.collapsed .sidebar-footer { padding: 8px 4px; }
/* Nav item text - hide when collapsed, properly handle overflow when expanded */
.nav-item-text {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
/* When sidebar is expanded, allow text to show fully */
.sidebar:not(.collapsed) .nav-item-text {
overflow: visible;
}
.sidebar.collapsed .nav-item-text { display: none; }
.sidebar-toggle {
background: none;
border: none;
color: var(--text-2);
cursor: pointer;
padding: 8px;
font-size: 16px;
width: 100%;
text-align: center;
}
.sidebar-toggle:hover { color: var(--text-0); }
.sidebar-header {
padding: 16px 16px 20px;
display: flex;
align-items: baseline;
gap: 8px;
}
.sidebar-header .logo {
font-size: 15px;
font-weight: 700;
letter-spacing: -0.4px;
color: var(--text-0);
}
.sidebar-header .version {
font-size: 10px;
color: var(--text-2);
}
.nav-section {
padding: 0 8px;
margin-bottom: 2px;
}
.nav-label {
padding: 8px 8px 4px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-2);
}
.nav-item {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-radius: var(--radius-sm);
cursor: pointer;
color: var(--text-1);
font-size: 13px;
font-weight: 450;
transition: color 0.1s, background 0.1s;
border: none;
background: none;
width: 100%;
text-align: left;
border-left: 2px solid transparent;
margin-left: 0;
}
.nav-item:hover {
color: var(--text-0);
background: rgba(255,255,255,0.03);
}
.nav-item.active {
color: var(--accent-text);
border-left-color: var(--accent);
background: var(--accent-dim);
}
.nav-icon {
width: 18px;
text-align: center;
font-size: 14px;
opacity: 0.7;
}
.sidebar-spacer { flex: 1; }
.sidebar-footer {
padding: 12px;
border-top: 1px solid var(--border-subtle);
overflow: visible;
min-width: 0;
}
/* Hide footer content in collapsed sidebar */
.sidebar.collapsed .sidebar-footer .status-text { display: none; }
.sidebar.collapsed .sidebar-footer .user-info { justify-content: center; }
/* ── Main ── */
.main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
min-width: 0;
}
.header {
height: 48px;
min-height: 48px;
border-bottom: 1px solid var(--border-subtle);
display: flex;
align-items: center;
padding: 0 20px;
gap: 12px;
background: var(--bg-1);
}
.page-title {
font-size: 14px;
font-weight: 600;
color: var(--text-0);
}
.header-spacer { flex: 1; }
.content {
flex: 1;
overflow-y: auto;
padding: 20px;
}
/* ── Table ── */
.data-table {
width: 100%;
border-collapse: collapse;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
}
.data-table thead th {
padding: 8px 14px;
text-align: left;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.04em;
color: var(--text-2);
border-bottom: 1px solid var(--border);
background: var(--bg-3);
}
.data-table tbody td {
padding: 8px 14px;
font-size: 13px;
border-bottom: 1px solid var(--border-subtle);
max-width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.data-table tbody tr {
cursor: pointer;
transition: background 0.08s;
}
.data-table tbody tr:hover {
background: rgba(255,255,255,0.02);
}
.data-table tbody tr.row-selected {
background: rgba(99, 102, 241, 0.12);
}
.data-table tbody tr:last-child td {
border-bottom: none;
}
/* ── Buttons ── */
.btn {
padding: 5px 12px;
border-radius: var(--radius-sm);
border: none;
cursor: pointer;
font-size: 12px;
font-weight: 500;
transition: all 0.1s;
display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;
line-height: 1.5;
}
.btn-primary {
background: var(--accent);
color: #fff;
}
.btn-primary:hover { background: #8b8df7; }
.btn-secondary {
background: var(--bg-3);
color: var(--text-0);
border: 1px solid var(--border);
}
.btn-secondary:hover {
border-color: var(--border-strong);
background: rgba(255,255,255,0.06);
}
.btn-danger {
background: transparent;
color: var(--error);
border: 1px solid rgba(228, 88, 88, 0.25);
}
.btn-danger:hover { background: rgba(228, 88, 88, 0.08); }
.btn-ghost {
background: transparent;
color: var(--text-1);
border: none;
padding: 5px 8px;
}
.btn-ghost:hover {
color: var(--text-0);
background: rgba(255,255,255,0.04);
}
.btn-sm {
padding: 3px 8px;
font-size: 11px;
}
.btn-icon {
padding: 4px;
border-radius: var(--radius-sm);
background: transparent;
border: none;
color: var(--text-2);
cursor: pointer;
transition: color 0.1s;
font-size: 13px;
}
.btn-icon:hover { color: var(--text-0); }
/* ── Cards ── */
.card {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 16px;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.card-title {
font-size: 14px;
font-weight: 600;
}
/* ── Forms ── */
input[type="text"], textarea, select {
padding: 6px 10px;
border-radius: var(--radius-sm);
border: 1px solid var(--border);
background: var(--bg-0);
color: var(--text-0);
font-size: 13px;
outline: none;
transition: border-color 0.12s;
font-family: inherit;
}
input[type="text"]::placeholder, textarea::placeholder {
color: var(--text-2);
}
input[type="text"]:focus, textarea:focus, select:focus {
border-color: var(--accent);
}
.form-group { margin-bottom: 12px; }
.form-label {
display: block;
font-size: 11px;
font-weight: 600;
color: var(--text-1);
margin-bottom: 4px;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.form-row {
display: flex;
gap: 8px;
align-items: flex-end;
}
.form-row input[type="text"] {
flex: 1;
}
/* ── Toast ── */
.toast {
position: fixed;
bottom: 16px;
right: 16px;
padding: 8px 16px;
border-radius: var(--radius);
background: var(--bg-3);
border: 1px solid var(--border);
color: var(--text-0);
font-size: 12px;
box-shadow: var(--shadow);
z-index: 300;
animation: toast-in 0.15s ease-out;
max-width: 420px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
@keyframes toast-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
/* ── Detail ── */
.detail-actions {
display: flex;
gap: 6px;
margin-bottom: 16px;
}
.detail-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.detail-field {
padding: 10px 12px;
background: var(--bg-0);
border-radius: var(--radius-sm);
border: 1px solid var(--border-subtle);
}
.detail-field.full-width {
grid-column: 1 / -1;
}
.detail-label {
font-size: 10px;
font-weight: 600;
color: var(--text-2);
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 2px;
}
.detail-value {
font-size: 13px;
color: var(--text-0);
word-break: break-all;
}
.detail-value.mono {
font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
font-size: 11px;
color: var(--text-1);
}
/* ── Stats ── */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 12px;
margin-bottom: 20px;
}
.stat-card {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 14px 16px;
}
.stat-value {
font-size: 22px;
font-weight: 700;
color: var(--text-0);
line-height: 1.2;
font-variant-numeric: tabular-nums;
}
.stat-label {
font-size: 11px;
color: var(--text-2);
margin-top: 2px;
font-weight: 500;
}
/* ── Type badges ── */
.type-badge {
display: inline-block;
padding: 1px 6px;
border-radius: var(--radius-sm);
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.type-audio { background: rgba(139, 92, 246, 0.1); color: #9d8be0; }
.type-video { background: rgba(200, 72, 130, 0.1); color: #d07eaa; }
.type-image { background: rgba(34, 160, 80, 0.1); color: #5cb97a; }
.type-document { background: rgba(59, 120, 200, 0.1); color: #6ca0d4; }
.type-text { background: rgba(200, 160, 36, 0.1); color: #c4a840; }
.type-other { background: rgba(128, 128, 160, 0.08); color: var(--text-2); }
/* ── Tags ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 10px;
background: var(--accent-dim);
color: var(--accent-text);
border-radius: 12px;
font-size: 11px;
font-weight: 500;
}
.tag-badge .tag-remove {
cursor: pointer;
opacity: 0.4;
font-size: 13px;
line-height: 1;
transition: opacity 0.1s;
}
.tag-badge .tag-remove:hover { opacity: 1; }
.tag-badge.selected {
background: var(--accent);
color: #fff;
cursor: pointer;
}
.tag-badge:not(.selected) {
cursor: pointer;
}
/* ── Empty state ── */
.empty-state {
text-align: center;
padding: 48px 16px;
color: var(--text-2);
}
.empty-icon {
font-size: 32px;
margin-bottom: 12px;
opacity: 0.3;
}
.empty-title {
font-size: 15px;
font-weight: 600;
color: var(--text-1);
margin-bottom: 4px;
}
.empty-subtitle {
font-size: 12px;
max-width: 320px;
margin: 0 auto;
line-height: 1.5;
}
/* ── Settings ── */
.settings-section { margin-bottom: 24px; }
.section-title {
font-size: 14px;
font-weight: 600;
margin-bottom: 12px;
padding-bottom: 6px;
border-bottom: 1px solid var(--border-subtle);
}
.root-list { list-style: none; }
.root-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: var(--bg-0);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
margin-bottom: 4px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 12px;
color: var(--text-1);
}
.toggle {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 13px;
color: var(--text-0);
}
.toggle-track {
width: 32px;
height: 18px;
border-radius: 9px;
background: var(--bg-3);
border: 1px solid var(--border);
position: relative;
transition: background 0.15s;
flex-shrink: 0;
}
.toggle-track.active { background: var(--accent); border-color: var(--accent); }
.toggle-thumb {
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--text-0);
position: absolute;
top: 1px;
left: 1px;
transition: transform 0.15s;
}
.toggle-track.active .toggle-thumb {
transform: translateX(14px);
}
.toggle.disabled { opacity: 0.4; cursor: not-allowed; }
.info-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
border-bottom: 1px solid var(--border-subtle);
font-size: 13px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-1); font-weight: 500; }
.info-value { color: var(--text-0); }
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }
* {
scrollbar-width: thin;
scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.content {
scrollbar-width: thin;
scrollbar-color: rgba(255,255,255,0.08) transparent;
}
/* ── Import Tabs ── */
.import-tabs {
display: flex;
gap: 0;
margin-bottom: 16px;
border-bottom: 1px solid var(--border);
}
.import-tab {
padding: 8px 16px;
background: none;
border: none;
border-bottom: 2px solid transparent;
color: var(--text-2);
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: color 0.1s, border-color 0.1s;
}
.import-tab:hover {
color: var(--text-0);
}
.import-tab.active {
color: var(--accent-text);
border-bottom-color: var(--accent);
}
/* ── Batch Actions ── */
.batch-actions {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: var(--accent-dim);
border: 1px solid rgba(124, 126, 245, 0.2);
border-radius: var(--radius-sm);
margin-bottom: 12px;
font-size: 12px;
font-weight: 500;
color: var(--accent-text);
}
/* ── Action badges (audit) ── */
.action-danger {
background: rgba(228, 88, 88, 0.1);
color: #d47070;
}
/* ── Tag hierarchy ── */
.tag-group {
margin-bottom: 6px;
}
.tag-children {
margin-left: 16px;
margin-top: 4px;
display: flex;
flex-wrap: wrap;
gap: 4px;
}
/* ── Detail field inputs ── */
.detail-field input[type="text"],
.detail-field textarea,
.detail-field select {
width: 100%;
margin-top: 4px;
}
.detail-field textarea {
min-height: 64px;
resize: vertical;
}
/* ── Checkbox ── */
input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 16px;
height: 16px;
border: 1px solid var(--border-strong);
border-radius: 3px;
background: var(--bg-2);
cursor: pointer;
position: relative;
flex-shrink: 0;
transition: all 0.15s ease;
}
input[type="checkbox"]:hover {
border-color: var(--accent);
background: var(--bg-3);
}
input[type="checkbox"]:checked {
background: var(--accent);
border-color: var(--accent);
}
input[type="checkbox"]:checked::after {
content: "";
position: absolute;
left: 5px;
top: 2px;
width: 4px;
height: 8px;
border: solid var(--bg-0);
border-width: 0 2px 2px 0;
transform: rotate(45deg);
}
input[type="checkbox"]:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Checkbox with label */
.checkbox-label {
display: inline-flex;
align-items: center;
gap: 8px;
cursor: pointer;
font-size: 13px;
color: var(--text-1);
user-select: none;
}
.checkbox-label:hover {
color: var(--text-0);
}
.checkbox-label input[type="checkbox"] {
margin: 0;
}
/* Number input */
input[type="number"] {
width: 80px;
padding: 6px 8px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-0);
font-size: 12px;
-moz-appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
input[type="number"]:focus {
outline: none;
border-color: var(--accent);
}
/* ── Select ── */
select {
appearance: none;
-webkit-appearance: none;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%236c6c84' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 8px center;
padding-right: 26px;
min-width: 100px;
}
/* ── Code ── */
code {
padding: 1px 5px;
border-radius: var(--radius-sm);
background: var(--bg-0);
color: var(--accent-text);
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 11px;
}
ul { list-style: none; padding: 0; }
ul li { padding: 3px 0; font-size: 12px; color: var(--text-1); }
/* ── Status indicator ── */
.status-indicator {
display: flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 500;
min-width: 0;
overflow: visible;
}
.status-dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
}
.status-dot.connected { background: var(--success); }
.status-dot.disconnected { background: var(--error); }
.status-dot.checking { background: var(--warning); animation: pulse 1.5s infinite; }
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
.status-text {
color: var(--text-2);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
}
/* Ensure status text is visible in expanded sidebar */
.sidebar:not(.collapsed) .status-text {
overflow: visible;
}
/* ── Modal ── */
.modal-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
animation: fade-in 0.1s ease-out;
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
.modal {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 20px;
min-width: 360px;
max-width: 480px;
box-shadow: var(--shadow-lg);
}
.modal-title {
font-size: 15px;
font-weight: 600;
margin-bottom: 6px;
}
.modal-body {
font-size: 12px;
color: var(--text-1);
margin-bottom: 16px;
line-height: 1.5;
}
.modal-actions {
display: flex;
justify-content: flex-end;
gap: 6px;
}
/* ── Saved Searches ── */
.saved-searches-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: 300px;
overflow-y: auto;
}
.saved-search-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 12px;
background: var(--bg-1);
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.15s ease;
}
.saved-search-item:hover {
background: var(--bg-2);
}
.saved-search-info {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1;
min-width: 0;
}
.saved-search-name {
font-weight: 500;
color: var(--text-0);
}
.saved-search-query {
font-size: 11px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.card-header h4 {
margin: 0;
}
/* ── Offline banner ── */
.offline-banner {
background: rgba(228, 88, 88, 0.06);
border: 1px solid rgba(228, 88, 88, 0.2);
border-radius: var(--radius-sm);
padding: 8px 12px;
margin-bottom: 12px;
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: #d47070;
}
.offline-banner .offline-icon {
font-size: 14px;
flex-shrink: 0;
}
/* ── Utility ── */
.flex-row { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mb-16 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 8px; }
.text-muted { color: var(--text-1); }
.text-sm { font-size: 11px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }
/* ── Filter bar ── */
.filter-bar {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
background: var(--bg-0);
border: 1px solid var(--border-subtle);
border-radius: var(--radius);
margin-bottom: 12px;
}
.filter-bar .filter-row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.filter-bar .filter-label {
font-size: 11px;
font-weight: 500;
color: var(--text-2);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-right: 4px;
}
/* Filter chip/toggle style */
.filter-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: 14px;
cursor: pointer;
font-size: 11px;
color: var(--text-1);
transition: all 0.15s ease;
user-select: none;
}
.filter-chip:hover {
background: var(--bg-3);
border-color: var(--border-strong);
color: var(--text-0);
}
.filter-chip.active {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent-text);
}
.filter-chip input[type="checkbox"] {
width: 12px;
height: 12px;
margin: 0;
}
.filter-chip input[type="checkbox"]:checked::after {
left: 3px;
top: 1px;
width: 3px;
height: 6px;
}
/* Size filter inputs */
.filter-bar .size-filters {
display: flex;
align-items: center;
gap: 8px;
padding-top: 8px;
border-top: 1px solid var(--border-subtle);
}
.filter-bar .size-filter-group {
display: flex;
align-items: center;
gap: 6px;
}
.filter-bar .size-filter-group label {
font-size: 11px;
color: var(--text-2);
}
.filter-bar input[type="number"] {
width: 70px;
}
.filter-group {
display: flex;
align-items: center;
gap: 6px;
}
.filter-group label {
display: flex;
align-items: center;
gap: 3px;
cursor: pointer;
color: var(--text-1);
font-size: 11px;
white-space: nowrap;
}
.filter-group label:hover {
color: var(--text-0);
}
.filter-separator {
width: 1px;
height: 20px;
background: var(--border);
flex-shrink: 0;
}
.filter-size {
display: flex;
align-items: center;
gap: 4px;
font-size: 11px;
color: var(--text-1);
}
.filter-size input[type="text"] {
width: 60px;
padding: 3px 6px;
font-size: 11px;
}
/* ── Tooltips ── */
.tooltip-trigger {
display: inline-flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--bg-3);
color: var(--text-2);
font-size: 9px;
font-weight: 700;
cursor: help;
position: relative;
flex-shrink: 0;
margin-left: 4px;
}
.tooltip-trigger:hover {
background: var(--accent-dim);
color: var(--accent-text);
}
.tooltip-text {
display: none;
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%);
padding: 6px 10px;
background: var(--bg-3);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-0);
font-size: 11px;
font-weight: 400;
line-height: 1.4;
white-space: normal;
width: 220px;
text-transform: none;
letter-spacing: normal;
box-shadow: var(--shadow);
z-index: 100;
pointer-events: none;
}
.tooltip-trigger:hover .tooltip-text {
display: block;
}
/* ── Form label row ── */
.form-label-row {
display: flex;
align-items: center;
gap: 2px;
margin-bottom: 4px;
}
.form-label-row .form-label {
margin-bottom: 0;
}
/* ── Read-only banner ── */
.readonly-banner {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: rgba(212, 160, 55, 0.06);
border: 1px solid rgba(212, 160, 55, 0.2);
border-radius: var(--radius-sm);
margin-bottom: 16px;
font-size: 12px;
color: var(--warning);
}
/* ── Config path ── */
.config-path {
font-size: 11px;
color: var(--text-2);
margin-bottom: 12px;
font-family: 'JetBrains Mono', ui-monospace, monospace;
padding: 6px 10px;
background: var(--bg-0);
border-radius: var(--radius-sm);
border: 1px solid var(--border-subtle);
}
/* ── Settings cards ── */
.settings-card {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 20px;
margin-bottom: 16px;
}
.settings-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid var(--border-subtle);
}
.settings-card-title {
font-size: 14px;
font-weight: 600;
}
.config-status {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 10px;
border-radius: 12px;
font-size: 11px;
font-weight: 600;
}
.config-status.writable {
background: rgba(62, 201, 122, 0.1);
color: var(--success);
}
.config-status.readonly {
background: rgba(228, 88, 88, 0.1);
color: var(--error);
}
/* ── Disabled button ── */
.btn:disabled, .btn[disabled] {
opacity: 0.4;
cursor: not-allowed;
pointer-events: none;
}
/* Disabled with hint - shows what action is needed */
.btn.btn-disabled-hint:disabled {
opacity: 0.6;
border-style: dashed;
pointer-events: auto;
cursor: help;
}
/* ── Library Toolbar ── */
.library-toolbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
margin-bottom: 12px;
gap: 12px;
flex-wrap: wrap;
}
.toolbar-left {
display: flex;
align-items: center;
gap: 10px;
}
.toolbar-right {
display: flex;
align-items: center;
gap: 10px;
}
/* ── View Toggle ── */
.view-toggle {
display: flex;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
overflow: hidden;
}
.view-btn {
padding: 4px 10px;
background: var(--bg-2);
border: none;
color: var(--text-2);
cursor: pointer;
font-size: 14px;
line-height: 1;
transition: background 0.1s, color 0.1s;
}
.view-btn:first-child {
border-right: 1px solid var(--border);
}
.view-btn:hover {
color: var(--text-0);
background: var(--bg-3);
}
.view-btn.active {
background: var(--accent-dim);
color: var(--accent-text);
}
/* ── Sort & Page Size Controls ── */
.sort-control select,
.page-size-control select {
padding: 4px 24px 4px 8px;
font-size: 11px;
background: var(--bg-2);
}
.page-size-control {
display: flex;
align-items: center;
gap: 4px;
}
/* ── Media Grid ── */
.media-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
}
.media-card {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
overflow: hidden;
cursor: pointer;
transition: border-color 0.12s, box-shadow 0.12s;
position: relative;
}
.media-card:hover {
border-color: var(--border-strong);
box-shadow: var(--shadow-sm);
}
.media-card.selected {
border-color: var(--accent);
box-shadow: 0 0 0 1px var(--accent);
}
/* ── Card Checkbox ── */
.card-checkbox {
position: absolute;
top: 6px;
left: 6px;
z-index: 2;
opacity: 0;
transition: opacity 0.1s;
}
.media-card:hover .card-checkbox,
.media-card.selected .card-checkbox {
opacity: 1;
}
.card-checkbox input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
/* ── Card Thumbnail ── */
.card-thumbnail {
width: 100%;
aspect-ratio: 1;
background: var(--bg-0);
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.card-thumbnail img,
.card-thumb-img {
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
top: 0;
left: 0;
z-index: 1;
}
.card-type-icon {
font-size: 32px;
opacity: 0.4;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 0;
}
/* ── Card Info ── */
.card-info {
padding: 8px 10px;
}
.card-name {
font-size: 12px;
font-weight: 500;
color: var(--text-0);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 4px;
}
.card-meta {
display: flex;
align-items: center;
gap: 6px;
font-size: 10px;
}
.card-size {
color: var(--text-2);
font-size: 10px;
}
/* ── Table Thumbnail ── */
.table-thumb-cell {
width: 36px;
padding: 4px 6px !important;
position: relative;
}
.table-thumb {
width: 28px;
height: 28px;
object-fit: cover;
border-radius: 3px;
display: block;
}
.table-thumb-overlay {
position: absolute;
top: 4px;
left: 6px;
z-index: 1;
}
.table-type-icon {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
font-size: 14px;
opacity: 0.5;
border-radius: 3px;
background: var(--bg-0);
z-index: 0;
}
/* ── Type Filter Row ── */
.type-filter-row {
display: flex;
align-items: center;
gap: 6px;
padding: 4px 0;
margin-bottom: 6px;
flex-wrap: wrap;
}
.filter-chip {
padding: 3px 12px;
border-radius: 12px;
border: 1px solid var(--border);
background: var(--bg-2);
color: var(--text-2);
font-size: 11px;
cursor: pointer;
transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.filter-chip:hover {
color: var(--text-0);
background: var(--bg-3);
border-color: var(--border-strong);
}
.filter-chip.active {
background: var(--accent-dim);
color: var(--accent-text);
border-color: var(--accent);
}
/* ── Library Stats Row ── */
.library-stats {
display: flex;
justify-content: space-between;
align-items: center;
padding: 2px 0 6px 0;
font-size: 11px;
}
/* ── Sortable Table Headers ── */
.sortable-header {
cursor: pointer;
user-select: none;
transition: color 0.1s;
}
.sortable-header:hover {
color: var(--accent-text);
}
/* ── Card extra info ── */
.card-title,
.card-artist {
font-size: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
}
/* ── Pagination ── */
.pagination {
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
margin-top: 16px;
padding: 8px 0;
}
.page-btn {
min-width: 28px;
text-align: center;
font-variant-numeric: tabular-nums;
}
.page-ellipsis {
color: var(--text-2);
padding: 0 4px;
font-size: 12px;
user-select: none;
}
/* ── Loading indicator ── */
.loading-overlay {
display: flex;
align-items: center;
justify-content: center;
padding: 48px 16px;
color: var(--text-2);
font-size: 13px;
gap: 10px;
}
.spinner {
width: 18px;
height: 18px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.error-banner {
background: rgba(228, 88, 88, 0.06);
border: 1px solid rgba(228, 88, 88, 0.2);
border-radius: var(--radius-sm);
padding: 10px 14px;
margin-bottom: 12px;
font-size: 12px;
color: #d47070;
display: flex;
align-items: center;
gap: 8px;
}
.error-banner .error-icon {
font-size: 14px;
flex-shrink: 0;
}
/* ── Toast container (stacked) ── */
.toast-container {
position: fixed;
bottom: 16px;
right: 16px;
z-index: 300;
display: flex;
flex-direction: column-reverse;
gap: 6px;
align-items: flex-end;
}
.toast-container .toast {
position: static;
transform: none;
}
/* ── Nav badge ── */
.nav-badge {
margin-left: auto;
font-size: 10px;
font-weight: 600;
color: var(--text-2);
background: var(--bg-3);
padding: 1px 6px;
border-radius: 8px;
min-width: 20px;
text-align: center;
font-variant-numeric: tabular-nums;
}
/* ── Detail preview ── */
.detail-preview {
margin-bottom: 16px;
background: var(--bg-0);
border: 1px solid var(--border-subtle);
border-radius: var(--radius);
overflow: hidden;
text-align: center;
}
.detail-preview:has(.markdown-viewer) {
max-height: none;
overflow-y: auto;
text-align: left;
}
.detail-preview:not(:has(.markdown-viewer)) {
max-height: 450px;
}
.detail-preview img {
max-width: 100%;
max-height: 400px;
object-fit: contain;
display: block;
margin: 0 auto;
}
.detail-preview audio {
width: 100%;
padding: 16px;
}
.detail-preview video {
max-width: 100%;
max-height: 400px;
display: block;
margin: 0 auto;
}
/* ── Action badge styles (audit) ── */
.action-updated {
background: rgba(59, 120, 200, 0.1);
color: #6ca0d4;
}
.action-collection {
background: rgba(34, 160, 80, 0.1);
color: #5cb97a;
}
.action-collection-remove {
background: rgba(212, 160, 55, 0.1);
color: #c4a840;
}
.action-opened {
background: rgba(139, 92, 246, 0.1);
color: #9d8be0;
}
.action-scanned {
background: rgba(128, 128, 160, 0.08);
color: var(--text-2);
}
/* ── Audit controls ── */
.audit-controls {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 12px;
}
.filter-select {
padding: 4px 24px 4px 8px;
font-size: 11px;
background: var(--bg-2);
}
/* ── Clickable elements ── */
.clickable {
cursor: pointer;
color: var(--accent-text);
}
.clickable:hover {
text-decoration: underline;
}
.clickable-row {
cursor: pointer;
}
.clickable-row:hover {
background: rgba(255,255,255,0.03);
}
/* ── Progress bar ── */
.progress-bar {
width: 100%;
height: 8px;
background: var(--bg-3);
border-radius: 4px;
overflow: hidden;
margin-bottom: 6px;
}
.progress-fill {
height: 100%;
background: var(--accent);
border-radius: 4px;
transition: width 0.3s ease;
}
.progress-fill.indeterminate {
width: 30%;
animation: indeterminate 1.5s ease-in-out infinite;
}
@keyframes indeterminate {
0% { transform: translateX(-100%); }
100% { transform: translateX(400%); }
}
/* ── Import status panel ── */
.import-status-panel {
background: var(--bg-2);
border: 1px solid var(--accent);
border-radius: var(--radius);
padding: 12px 16px;
margin-bottom: 16px;
}
.import-status-header {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
font-size: 13px;
color: var(--text-0);
}
.import-current-file {
display: flex;
align-items: center;
gap: 4px;
margin-bottom: 6px;
font-size: 12px;
overflow: hidden;
}
.import-file-label {
color: var(--text-2);
flex-shrink: 0;
}
.import-file-name {
color: var(--text-0);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-family: monospace;
font-size: 11px;
}
.import-queue-indicator {
display: flex;
align-items: center;
gap: 4px;
margin-bottom: 8px;
font-size: 11px;
}
.import-queue-badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 18px;
height: 18px;
padding: 0 6px;
background: var(--accent-dim);
color: var(--accent-text);
border-radius: 9px;
font-weight: 600;
font-size: 10px;
}
.import-queue-text {
color: var(--text-2);
}
/* ── Sidebar import progress ── */
.sidebar-import-progress {
padding: 8px 12px;
background: var(--bg-2);
border-top: 1px solid var(--border-subtle);
font-size: 11px;
}
.sidebar-import-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 4px;
color: var(--text-1);
}
.sidebar-import-file {
color: var(--text-2);
font-size: 10px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 4px;
}
.sidebar-import-progress .progress-bar {
height: 3px;
}
.sidebar.collapsed .sidebar-import-progress {
padding: 6px;
}
.sidebar.collapsed .sidebar-import-header span,
.sidebar.collapsed .sidebar-import-file {
display: none;
}
/* ── Tag confirmation ── */
.tag-confirm-delete {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 10px;
color: var(--text-1);
}
.tag-confirm-yes {
cursor: pointer;
color: var(--error);
font-weight: 600;
}
.tag-confirm-yes:hover {
text-decoration: underline;
}
.tag-confirm-no {
cursor: pointer;
color: var(--text-2);
font-weight: 500;
}
.tag-confirm-no:hover {
text-decoration: underline;
}
/* ── Help overlay ── */
.help-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 200;
animation: fade-in 0.1s ease-out;
}
.help-dialog {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 24px;
min-width: 300px;
max-width: 400px;
box-shadow: var(--shadow-lg);
}
.help-dialog h3 {
font-size: 16px;
font-weight: 600;
margin-bottom: 16px;
}
.help-shortcuts {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 16px;
}
.shortcut-row {
display: flex;
align-items: center;
gap: 12px;
}
.shortcut-row kbd {
display: inline-block;
padding: 2px 8px;
background: var(--bg-0);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 11px;
color: var(--text-0);
min-width: 32px;
text-align: center;
}
.shortcut-row span {
font-size: 13px;
color: var(--text-1);
}
.help-close {
display: block;
width: 100%;
padding: 6px 12px;
background: var(--bg-3);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-0);
font-size: 12px;
cursor: pointer;
text-align: center;
}
.help-close:hover {
background: rgba(255,255,255,0.06);
}
/* ── Add media modal (collections) ── */
.modal.wide {
max-width: 600px;
max-height: 70vh;
overflow-y: auto;
}
/* ── Database management ── */
.db-actions {
display: flex;
flex-direction: column;
gap: 16px;
padding: 12px;
}
.db-action-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 12px;
border-radius: 6px;
background: rgba(255,255,255,0.015);
}
.db-action-info {
flex: 1;
}
.db-action-info h4 {
font-size: 0.95rem;
font-weight: 600;
color: var(--text-0);
margin-bottom: 4px;
}
.db-action-confirm {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.danger-card {
border: 1px solid rgba(228, 88, 88, 0.25);
}
/* ── Library select-all banner ── */
.select-all-banner {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 8px 16px;
background: rgba(99, 102, 241, 0.08);
border-radius: 6px;
margin-bottom: 8px;
font-size: 0.85rem;
color: var(--text-1);
}
.select-all-banner button {
background: none;
border: none;
color: var(--accent);
cursor: pointer;
font-weight: 600;
text-decoration: underline;
font-size: 0.85rem;
padding: 0;
}
.select-all-banner button:hover {
color: var(--text-0);
}
/* ── Media Player ── */
.media-player {
position: relative;
background: var(--bg-0);
border-radius: var(--radius);
overflow: hidden;
}
.media-player:focus { outline: none; }
.media-player-audio .player-artwork {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24px 16px 8px;
gap: 8px;
}
.player-artwork img {
max-width: 200px;
max-height: 200px;
border-radius: var(--radius);
object-fit: cover;
}
.player-artwork-placeholder {
width: 120px;
height: 120px;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-2);
border-radius: var(--radius);
font-size: 48px;
opacity: 0.3;
}
.player-title {
font-size: 13px;
font-weight: 500;
color: var(--text-0);
text-align: center;
}
.player-controls {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
background: var(--bg-2);
}
.media-player-video .player-controls {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
opacity: 0;
transition: opacity 0.2s;
}
.media-player-video:hover .player-controls {
opacity: 1;
}
.play-btn, .mute-btn, .fullscreen-btn {
background: none;
border: none;
color: var(--text-0);
cursor: pointer;
font-size: 16px;
padding: 4px;
line-height: 1;
transition: color 0.1s;
}
.play-btn:hover, .mute-btn:hover, .fullscreen-btn:hover {
color: var(--accent-text);
}
.player-time {
font-size: 11px;
color: var(--text-2);
font-family: 'JetBrains Mono', ui-monospace, monospace;
min-width: 36px;
text-align: center;
user-select: none;
}
.seek-bar {
flex: 1;
-webkit-appearance: none;
appearance: none;
height: 4px;
border-radius: 2px;
background: var(--bg-3);
outline: none;
cursor: pointer;
}
.seek-bar::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--accent);
cursor: pointer;
border: none;
}
.seek-bar::-moz-range-thumb {
width: 12px;
height: 12px;
border-radius: 50%;
background: var(--accent);
cursor: pointer;
border: none;
}
.volume-slider {
width: 70px;
-webkit-appearance: none;
appearance: none;
height: 4px;
border-radius: 2px;
background: var(--bg-3);
outline: none;
cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--text-1);
cursor: pointer;
border: none;
}
.volume-slider::-moz-range-thumb {
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--text-1);
cursor: pointer;
border: none;
}
/* ── Image Viewer ── */
.image-viewer-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.92);
z-index: 150;
display: flex;
flex-direction: column;
animation: fade-in 0.15s ease-out;
}
.image-viewer-overlay:focus { outline: none; }
.image-viewer-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
background: rgba(0, 0, 0, 0.5);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
z-index: 2;
user-select: none;
}
.image-viewer-toolbar-left,
.image-viewer-toolbar-center,
.image-viewer-toolbar-right {
display: flex;
align-items: center;
gap: 6px;
}
.iv-btn {
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.1);
color: var(--text-0);
border-radius: var(--radius-sm);
padding: 4px 10px;
font-size: 12px;
cursor: pointer;
transition: background 0.1s;
}
.iv-btn:hover {
background: rgba(255, 255, 255, 0.12);
}
.iv-close {
color: var(--error);
font-weight: 600;
}
.iv-zoom-label {
font-size: 11px;
color: var(--text-1);
min-width: 40px;
text-align: center;
font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.image-viewer-canvas {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.image-viewer-canvas img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
user-select: none;
-webkit-user-drag: none;
}
/* ── Markdown Viewer ── */
.markdown-viewer {
padding: 16px;
text-align: left;
}
.markdown-content {
max-width: 800px;
color: var(--text-0);
line-height: 1.7;
font-size: 14px;
text-align: left;
}
.markdown-content h1 { font-size: 1.8em; font-weight: 700; margin: 1em 0 0.5em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.3em; }
.markdown-content h2 { font-size: 1.5em; font-weight: 600; margin: 0.8em 0 0.4em; border-bottom: 1px solid var(--border-subtle); padding-bottom: 0.2em; }
.markdown-content h3 { font-size: 1.25em; font-weight: 600; margin: 0.6em 0 0.3em; }
.markdown-content h4 { font-size: 1.1em; font-weight: 600; margin: 0.5em 0 0.25em; }
.markdown-content h5, .markdown-content h6 { font-size: 1em; font-weight: 600; margin: 0.4em 0 0.2em; color: var(--text-1); }
.markdown-content p { margin: 0 0 1em; }
.markdown-content a { color: var(--accent); text-decoration: none; }
.markdown-content a:hover { text-decoration: underline; }
.markdown-content pre {
background: var(--bg-3);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
padding: 12px 16px;
overflow-x: auto;
margin: 0 0 1em;
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 12px;
line-height: 1.5;
}
.markdown-content code {
background: var(--bg-3);
padding: 1px 5px;
border-radius: var(--radius-sm);
font-family: 'JetBrains Mono', ui-monospace, monospace;
font-size: 0.9em;
}
.markdown-content pre code {
background: none;
padding: 0;
}
.markdown-content blockquote {
border-left: 3px solid var(--accent);
padding: 4px 16px;
margin: 0 0 1em;
color: var(--text-1);
background: rgba(124, 126, 245, 0.04);
}
.markdown-content table {
width: 100%;
border-collapse: collapse;
margin: 0 0 1em;
}
.markdown-content th, .markdown-content td {
padding: 6px 12px;
border: 1px solid var(--border);
font-size: 13px;
}
.markdown-content th {
background: var(--bg-3);
font-weight: 600;
text-align: left;
}
.markdown-content ul, .markdown-content ol {
margin: 0 0 1em;
padding-left: 24px;
}
.markdown-content ul { list-style: disc; }
.markdown-content ol { list-style: decimal; }
.markdown-content li { padding: 2px 0; font-size: 14px; color: var(--text-0); }
.markdown-content hr {
border: none;
border-top: 1px solid var(--border);
margin: 1.5em 0;
}
.markdown-content img {
max-width: 100%;
border-radius: var(--radius);
}
.markdown-content tr:nth-child(even) {
background: var(--bg-2);
}
.markdown-content .footnote-definition {
font-size: 0.85em;
color: var(--text-1);
margin-top: 0.5em;
padding-left: 1.5em;
}
.markdown-content .footnote-definition sup {
color: var(--accent);
margin-right: 4px;
}
.markdown-content sup a {
color: var(--accent);
text-decoration: none;
font-size: 0.8em;
}
/* ── Frontmatter Card ── */
.frontmatter-card {
max-width: 800px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 12px 16px;
margin-bottom: 16px;
}
.frontmatter-fields {
display: grid;
grid-template-columns: auto 1fr;
gap: 4px 12px;
margin: 0;
}
.frontmatter-fields dt {
font-weight: 600;
font-size: 12px;
color: var(--text-1);
text-transform: capitalize;
}
.frontmatter-fields dd {
font-size: 13px;
color: var(--text-0);
margin: 0;
}
/* ── Duplicates ── */
.duplicates-view {
padding: 0;
}
.duplicates-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16px;
}
.duplicates-header h3 {
margin: 0;
}
.duplicates-summary {
display: flex;
align-items: center;
gap: 12px;
}
.duplicate-group {
border: 1px solid var(--border);
border-radius: var(--radius);
margin-bottom: 8px;
overflow: hidden;
}
.duplicate-group-header {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
padding: 10px 14px;
background: var(--bg-2);
border: none;
cursor: pointer;
text-align: left;
color: var(--text-0);
font-size: 13px;
}
.duplicate-group-header:hover {
background: var(--bg-3);
}
.expand-icon {
font-size: 10px;
width: 14px;
flex-shrink: 0;
}
.group-name {
font-weight: 600;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.group-badge {
background: var(--accent);
color: white;
padding: 2px 8px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
flex-shrink: 0;
}
.group-size {
flex-shrink: 0;
font-size: 12px;
}
.group-hash {
font-size: 11px;
flex-shrink: 0;
}
.duplicate-items {
border-top: 1px solid var(--border);
}
.duplicate-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
border-bottom: 1px solid var(--border-subtle);
}
.duplicate-item:last-child {
border-bottom: none;
}
.duplicate-item-keep {
background: rgba(76, 175, 80, 0.06);
}
.dup-thumb {
width: 48px;
height: 48px;
flex-shrink: 0;
border-radius: var(--radius-sm);
overflow: hidden;
}
.dup-thumb-img {
width: 100%;
height: 100%;
object-fit: cover;
}
.dup-thumb-placeholder {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-3);
font-size: 20px;
color: var(--text-2);
}
.dup-info {
flex: 1;
min-width: 0;
}
.dup-filename {
font-weight: 600;
font-size: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dup-path {
font-size: 11px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dup-meta {
font-size: 12px;
margin-top: 2px;
}
.dup-actions {
display: flex;
align-items: center;
gap: 6px;
flex-shrink: 0;
}
.keep-badge {
background: rgba(76, 175, 80, 0.15);
color: #4caf50;
padding: 2px 10px;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
}
/* ── Login ── */
.login-container {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background: var(--bg-0);
}
.login-card {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 32px;
width: 360px;
box-shadow: var(--shadow-lg);
}
.login-title {
font-size: 20px;
font-weight: 700;
color: var(--text-0);
text-align: center;
margin-bottom: 4px;
}
.login-subtitle {
font-size: 13px;
color: var(--text-2);
text-align: center;
margin-bottom: 20px;
}
.login-error {
background: rgba(228, 88, 88, 0.08);
border: 1px solid rgba(228, 88, 88, 0.2);
border-radius: var(--radius-sm);
padding: 8px 12px;
margin-bottom: 12px;
font-size: 12px;
color: var(--error);
}
.login-form input[type="text"],
.login-form input[type="password"] {
width: 100%;
}
.login-btn {
width: 100%;
padding: 8px 16px;
font-size: 13px;
margin-top: 4px;
}
/* ── User Info (sidebar) ── */
.user-info {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
overflow: hidden;
min-width: 0;
}
.user-name {
font-weight: 500;
color: var(--text-0);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 90px;
flex-shrink: 1;
}
/* Hide user details in collapsed sidebar, show only logout icon */
.sidebar.collapsed .user-info .user-name,
.sidebar.collapsed .user-info .role-badge,
.sidebar.collapsed .user-info .btn { display: none; }
.sidebar.collapsed .user-info {
justify-content: center;
padding: 4px;
}
.role-badge {
display: inline-block;
padding: 1px 6px;
border-radius: var(--radius-sm);
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
}
.role-admin { background: rgba(139, 92, 246, 0.1); color: #9d8be0; }
.role-editor { background: rgba(34, 160, 80, 0.1); color: #5cb97a; }
.role-viewer { background: rgba(59, 120, 200, 0.1); color: #6ca0d4; }
/* ── Settings fields ── */
.settings-field {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
border-bottom: 1px solid var(--border-subtle);
}
.settings-field:last-child { border-bottom: none; }
.settings-field select {
min-width: 120px;
}
.settings-card-body {
padding-top: 4px;
}
/* ── Detail no preview ── */
.detail-no-preview {
padding: 32px 16px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
}
/* ── Light Theme ── */
.theme-light {
--bg-0: #f5f5f7;
--bg-1: #eeeef0;
--bg-2: #ffffff;
--bg-3: #e8e8ec;
--border-subtle: rgba(0, 0, 0, 0.06);
--border: rgba(0, 0, 0, 0.1);
--border-strong: rgba(0, 0, 0, 0.16);
--text-0: #1a1a2e;
--text-1: #555570;
--text-2: #8888a0;
--accent: #6366f1;
--accent-dim: rgba(99, 102, 241, 0.1);
--accent-text: #4f52e8;
--shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
--shadow: 0 2px 8px rgba(0,0,0,0.1);
--shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}
.theme-light ::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
}
.theme-light ::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.35);
}
.theme-light ::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.05);
}
/* ── Skeleton Loading States ── */
@keyframes skeleton-pulse {
0% { opacity: 0.6; }
50% { opacity: 0.3; }
100% { opacity: 0.6; }
}
.skeleton-pulse {
animation: skeleton-pulse 1.5s ease-in-out infinite;
background: var(--bg-3);
border-radius: 4px;
}
.skeleton-card {
display: flex;
flex-direction: column;
gap: 8px;
padding: 8px;
}
.skeleton-thumb {
width: 100%;
aspect-ratio: 1;
border-radius: 6px;
}
.skeleton-text {
height: 14px;
width: 80%;
}
.skeleton-text-short {
width: 50%;
}
.skeleton-row {
display: flex;
gap: 12px;
padding: 10px 16px;
align-items: center;
}
.skeleton-cell {
height: 14px;
flex: 1;
border-radius: 4px;
}
.skeleton-cell-icon {
width: 32px;
height: 32px;
flex: none;
border-radius: 4px;
}
.skeleton-cell-wide {
flex: 3;
}
.loading-overlay {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
background: rgba(0, 0, 0, 0.3);
z-index: 100;
border-radius: 8px;
}
.loading-spinner {
width: 32px;
height: 32px;
border: 3px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.loading-message {
color: var(--text-1);
font-size: 0.9rem;
}
/* ── Breadcrumb ── */
.breadcrumb {
display: flex;
align-items: center;
gap: 4px;
padding: 8px 16px;
font-size: 0.85rem;
color: var(--text-2);
}
.breadcrumb-sep {
color: var(--text-2);
opacity: 0.5;
}
.breadcrumb-link {
color: var(--accent-text);
text-decoration: none;
cursor: pointer;
}
.breadcrumb-link:hover {
text-decoration: underline;
}
.breadcrumb-current {
color: var(--text-0);
font-weight: 500;
}
/* ── Queue Panel ── */
.queue-panel {
display: flex;
flex-direction: column;
border-left: 1px solid var(--border);
background: var(--bg-1);
min-width: 280px;
max-width: 320px;
}
.queue-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--border-subtle);
}
.queue-header h3 {
margin: 0;
font-size: 0.9rem;
color: var(--text-0);
}
.queue-controls {
display: flex;
gap: 2px;
}
.queue-list {
overflow-y: auto;
flex: 1;
}
.queue-item {
display: flex;
align-items: center;
padding: 8px 16px;
cursor: pointer;
border-bottom: 1px solid var(--border-subtle);
transition: background 0.15s;
}
.queue-item:hover {
background: var(--bg-2);
}
.queue-item-active {
background: var(--accent-dim);
border-left: 3px solid var(--accent);
}
.queue-item-info {
flex: 1;
min-width: 0;
}
.queue-item-title {
display: block;
font-size: 0.85rem;
color: var(--text-0);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.queue-item-artist {
display: block;
font-size: 0.75rem;
color: var(--text-2);
}
.queue-item-remove {
opacity: 0;
transition: opacity 0.15s;
}
.queue-item:hover .queue-item-remove {
opacity: 1;
}
.queue-empty {
padding: 24px 16px;
text-align: center;
color: var(--text-2);
font-size: 0.85rem;
}
/* ── PDF Viewer ── */
.pdf-viewer {
display: flex;
flex-direction: column;
height: 100%;
min-height: 500px;
background: var(--bg-0);
border-radius: var(--radius);
overflow: hidden;
}
.pdf-toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 12px;
background: var(--bg-1);
border-bottom: 1px solid var(--border);
}
.pdf-toolbar-group {
display: flex;
align-items: center;
gap: 4px;
}
.pdf-toolbar-btn {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-1);
font-size: 14px;
cursor: pointer;
transition: all 0.15s;
}
.pdf-toolbar-btn:hover:not(:disabled) {
background: var(--bg-3);
color: var(--text-0);
}
.pdf-toolbar-btn:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.pdf-zoom-label {
min-width: 45px;
text-align: center;
font-size: 12px;
color: var(--text-1);
}
.pdf-container {
flex: 1;
position: relative;
overflow: hidden;
background: var(--bg-2);
}
.pdf-object {
width: 100%;
height: 100%;
border: none;
}
.pdf-loading {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
background: var(--bg-1);
color: var(--text-1);
}
.pdf-error {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
background: var(--bg-1);
color: var(--text-1);
padding: 24px;
text-align: center;
}
.pdf-fallback {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 48px 24px;
text-align: center;
color: var(--text-2);
}
/* Light theme adjustments */
.theme-light .pdf-container {
background: #e8e8e8;
}
/* ── Backlinks Panel ── */
.backlinks-panel,
.outgoing-links-panel {
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
margin-top: 16px;
overflow: hidden;
}
.backlinks-header,
.outgoing-links-header {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 14px;
background: var(--bg-3);
cursor: pointer;
user-select: none;
transition: background 0.1s;
}
.backlinks-header:hover,
.outgoing-links-header:hover {
background: rgba(255, 255, 255, 0.04);
}
.backlinks-toggle,
.outgoing-links-toggle {
font-size: 10px;
color: var(--text-2);
width: 12px;
text-align: center;
}
.backlinks-title,
.outgoing-links-title {
font-size: 12px;
font-weight: 600;
color: var(--text-0);
flex: 1;
}
.backlinks-count,
.outgoing-links-count {
font-size: 11px;
color: var(--text-2);
}
.backlinks-reindex-btn {
display: flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
padding: 0;
margin-left: auto;
background: transparent;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text-2);
font-size: 12px;
cursor: pointer;
transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.backlinks-reindex-btn:hover:not(:disabled) {
background: var(--bg-2);
color: var(--text-0);
border-color: var(--border-strong);
}
.backlinks-reindex-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.spinner-tiny {
width: 10px;
height: 10px;
border: 1.5px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
.backlinks-message {
padding: 8px 12px;
margin-bottom: 10px;
border-radius: var(--radius-sm);
font-size: 11px;
}
.backlinks-message.success {
background: rgba(62, 201, 122, 0.08);
border: 1px solid rgba(62, 201, 122, 0.2);
color: var(--success);
}
.backlinks-message.error {
background: rgba(228, 88, 88, 0.06);
border: 1px solid rgba(228, 88, 88, 0.2);
color: var(--error);
}
.outgoing-links-unresolved-badge {
margin-left: 8px;
padding: 2px 8px;
border-radius: 10px;
font-size: 10px;
font-weight: 500;
background: rgba(212, 160, 55, 0.12);
color: var(--warning);
}
.outgoing-links-global-unresolved {
display: flex;
align-items: center;
gap: 6px;
margin-top: 12px;
padding: 10px 12px;
background: rgba(212, 160, 55, 0.06);
border: 1px solid rgba(212, 160, 55, 0.15);
border-radius: var(--radius-sm);
font-size: 11px;
color: var(--text-2);
}
.outgoing-links-global-unresolved .unresolved-icon {
color: var(--warning);
}
.backlinks-content,
.outgoing-links-content {
padding: 12px;
border-top: 1px solid var(--border-subtle);
}
.backlinks-loading,
.outgoing-links-loading {
display: flex;
align-items: center;
gap: 8px;
padding: 12px;
color: var(--text-2);
font-size: 12px;
}
.backlinks-error,
.outgoing-links-error {
padding: 8px 12px;
background: rgba(228, 88, 88, 0.06);
border: 1px solid rgba(228, 88, 88, 0.2);
border-radius: var(--radius-sm);
font-size: 12px;
color: var(--error);
}
.backlinks-empty,
.outgoing-links-empty {
padding: 16px;
text-align: center;
color: var(--text-2);
font-size: 12px;
font-style: italic;
}
.backlinks-list,
.outgoing-links-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 6px;
}
.backlink-item,
.outgoing-link-item {
padding: 10px 12px;
background: var(--bg-0);
border: 1px solid var(--border-subtle);
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.1s, border-color 0.1s;
}
.backlink-item:hover,
.outgoing-link-item:hover {
background: var(--bg-1);
border-color: var(--border);
}
.backlink-source,
.outgoing-link-target {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 4px;
}
.backlink-title,
.outgoing-link-text {
font-size: 13px;
font-weight: 500;
color: var(--text-0);
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.backlink-type-badge,
.outgoing-link-type-badge {
display: inline-block;
padding: 1px 6px;
border-radius: 8px;
font-size: 9px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.backlink-type-wikilink,
.link-type-wikilink {
background: rgba(124, 126, 245, 0.1);
color: var(--accent-text);
}
.backlink-type-embed,
.link-type-embed {
background: rgba(139, 92, 246, 0.1);
color: #9d8be0;
}
.backlink-type-markdown_link,
.link-type-markdown_link {
background: rgba(59, 120, 200, 0.1);
color: #6ca0d4;
}
.backlink-context {
font-size: 11px;
color: var(--text-2);
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.backlink-line {
color: var(--text-1);
font-weight: 500;
}
.unresolved-badge {
padding: 1px 6px;
border-radius: 8px;
font-size: 9px;
font-weight: 600;
background: rgba(212, 160, 55, 0.1);
color: var(--warning);
}
.outgoing-link-item.unresolved {
opacity: 0.7;
border-style: dashed;
}
.spinner-small {
width: 14px;
height: 14px;
border: 2px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.7s linear infinite;
}
/* ── Graph View ── */
.graph-view {
display: flex;
flex-direction: column;
height: 100%;
background: var(--bg-1);
border-radius: var(--radius);
overflow: hidden;
}
.graph-toolbar {
display: flex;
align-items: center;
gap: 16px;
padding: 12px 16px;
background: var(--bg-2);
border-bottom: 1px solid var(--border);
}
.graph-title {
font-size: 14px;
font-weight: 600;
color: var(--text-0);
}
.graph-controls {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: var(--text-1);
}
.graph-controls select {
padding: 4px 20px 4px 8px;
font-size: 11px;
background: var(--bg-3);
}
.graph-stats {
margin-left: auto;
font-size: 11px;
color: var(--text-2);
}
.graph-container {
flex: 1;
position: relative;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
background: var(--bg-0);
}
.graph-loading,
.graph-error,
.graph-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 48px;
color: var(--text-2);
font-size: 13px;
text-align: center;
}
.graph-svg {
max-width: 100%;
max-height: 100%;
}
.graph-edges line {
stroke: var(--border-strong);
stroke-width: 1;
opacity: 0.6;
}
.graph-edges line.edge-type-wikilink {
stroke: var(--accent);
}
.graph-edges line.edge-type-embed {
stroke: #9d8be0;
stroke-dasharray: 4 2;
}
.graph-nodes .graph-node {
cursor: pointer;
}
.graph-nodes .graph-node circle {
fill: #4caf50;
stroke: #388e3c;
stroke-width: 2;
transition: fill 0.15s, stroke 0.15s;
}
.graph-nodes .graph-node:hover circle {
fill: #66bb6a;
}
.graph-nodes .graph-node.selected circle {
fill: var(--accent);
stroke: #5456d6;
}
.graph-nodes .graph-node text {
fill: var(--text-1);
font-size: 11px;
pointer-events: none;
}
/* ── Node Details Panel ── */
.node-details-panel {
position: absolute;
top: 16px;
right: 16px;
width: 280px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius);
box-shadow: var(--shadow);
z-index: 10;
}
.node-details-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 14px;
border-bottom: 1px solid var(--border-subtle);
}
.node-details-header h3 {
font-size: 13px;
font-weight: 600;
color: var(--text-0);
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.node-details-panel .close-btn {
background: none;
border: none;
color: var(--text-2);
cursor: pointer;
font-size: 14px;
padding: 2px 6px;
line-height: 1;
}
.node-details-panel .close-btn:hover {
color: var(--text-0);
}
.node-details-content {
padding: 14px;
}
.node-details-content .node-title {
font-size: 12px;
color: var(--text-1);
margin-bottom: 12px;
}
.node-stats {
display: flex;
gap: 16px;
margin-bottom: 12px;
}
.node-stats .stat {
font-size: 12px;
color: var(--text-2);
}
.node-stats .stat strong {
color: var(--text-0);
}
/* ── Wikilink Styles (in markdown) ── */
.wikilink {
color: var(--accent-text);
text-decoration: none;
border-bottom: 1px dashed var(--accent);
cursor: pointer;
transition: border-color 0.1s, color 0.1s;
}
.wikilink:hover {
color: var(--accent);
border-bottom-style: solid;
}
.wikilink-embed {
display: inline-block;
padding: 2px 8px;
background: rgba(139, 92, 246, 0.08);
border: 1px dashed rgba(139, 92, 246, 0.3);
border-radius: var(--radius-sm);
color: #9d8be0;
font-size: 12px;
cursor: default;
}
/* ── Light theme adjustments for links and graph ── */
.theme-light .graph-nodes .graph-node text {
fill: var(--text-0);
}
.theme-light .graph-edges line {
stroke: rgba(0, 0, 0, 0.2);
}
"#;