Files
papercrate/frontend/src/styles.css
T
2025-10-12 14:07:02 +02:00

1252 lines
20 KiB
CSS

:root {
color-scheme: light;
--bg: #f4f5f7;
--surface: #ffffff;
--surface-subtle: #f8f9fb;
--fg: #1b1f24;
--muted: #5f6673;
--border: #d0d5dd;
--accent: #2b5cff;
--accent-soft: rgba(43, 92, 255, 0.12);
--danger: #d92c20;
--success: #12805a;
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
font-size: 15px;
}
html,
body {
height: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--fg);
overflow: hidden;
}
#app {
height: 100%;
background: var(--bg);
}
button {
font: inherit;
border-radius: 2px;
border: 1px solid transparent;
padding: 0.35rem 0.85rem;
background: var(--accent);
color: #fff;
cursor: pointer;
font-weight: 500;
transition: background 0.15s ease, border-color 0.15s ease;
}
button[disabled] {
opacity: 0.55;
cursor: not-allowed;
}
button:hover:not([disabled]) {
background: #2047d9;
}
a.button-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
font: inherit;
border-radius: 2px;
border: 1px solid transparent;
padding: 0.35rem 0.85rem;
background: var(--accent);
color: #fff;
text-decoration: none;
font-weight: 500;
transition: background 0.15s ease, border-color 0.15s ease;
}
a.button-link[aria-disabled='true'] {
opacity: 0.55;
pointer-events: none;
}
a.button-link:hover:not([aria-disabled='true']) {
background: #2047d9;
}
button.secondary {
background: transparent;
color: var(--fg);
border-color: var(--border);
}
button.secondary:hover:not([disabled]) {
background: var(--surface-subtle);
}
button.danger {
background: transparent;
color: var(--danger);
border-color: rgba(217, 44, 32, 0.45);
}
button.danger:hover:not([disabled]) {
border-color: var(--danger);
background: rgba(217, 44, 32, 0.08);
}
button.icon-button {
padding: 0.25rem 0.55rem;
min-width: auto;
}
button.icon-button.ghost {
border: none;
background: transparent;
color: var(--muted);
padding: 0.2rem;
}
button.icon-button.ghost:hover:not([disabled]) {
color: var(--danger);
background: transparent;
}
.with-icon {
display: inline-flex;
align-items: center;
gap: 0.35rem;
}
.icon-inline {
width: 1rem;
height: 1rem;
}
.icon {
width: 1rem;
height: 1rem;
display: inline-flex;
align-items: center;
justify-content: center;
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.icon path {
stroke: currentColor;
stroke-width: 1.6;
fill: none;
}
.app-shell {
height: 100%;
display: flex;
flex-direction: column;
color: var(--fg);
background: var(--bg);
}
.app-bar {
display: flex;
flex-direction: column;
gap: 0.4rem;
padding: 0.6rem 1.5rem 0.4rem;
background: var(--surface);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 10;
}
.app-bar__main {
display: flex;
align-items: center;
justify-content: space-between;
}
.app-bar__meta {
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.app-bar h1 {
margin: 0;
font-size: 1.1rem;
font-weight: 600;
}
.app-bar__hint {
color: var(--muted);
font-size: 0.9rem;
}
.app-bar__actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
.app-bar__status {
margin: 0 1rem;
min-width: 220px;
}
.app-bar__status .status-banner {
margin: 0;
}
.app-main {
flex: 1;
display: grid;
grid-template-columns: 220px minmax(0, 1fr) 320px;
gap: 1.5rem;
padding: 0.75rem 1.5rem 1.25rem;
min-height: 0;
overflow: hidden;
}
.tags-main {
flex: 1;
display: grid;
grid-template-columns: 220px minmax(0, 1fr);
gap: 1.5rem;
padding: 0.75rem 1.5rem 1.25rem;
min-height: 0;
overflow: hidden;
}
.preview-main {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.preview-workspace {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.75rem;
min-height: 0;
}
.preview-workspace__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 0.75rem 1.5rem 0;
}
.preview-workspace__meta {
display: flex;
align-items: center;
gap: 0.75rem;
}
.preview-workspace__meta h2 {
margin: 0;
font-size: 1.1rem;
}
.preview-workspace__meta .meta {
display: block;
font-size: 0.8rem;
color: var(--muted);
}
.preview-workspace__actions {
display: flex;
align-items: center;
gap: 0.5rem;
}
.preview-workspace__body {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.preview-workspace__object {
width: 100%;
height: 100%;
border: none;
}
.tags-panel__body {
overflow-y: auto;
}
.tags-table {
width: 100%;
overflow: auto;
}
.tags-table table {
width: 100%;
border-collapse: collapse;
min-width: 320px;
}
.tags-table th,
.tags-table td {
padding: 0.45rem 0.6rem;
text-align: left;
border-bottom: 1px solid var(--divider);
font-size: 0.85rem;
}
.tags-table th.numeric,
.tags-table td.numeric {
text-align: right;
}
.tags-table th.actions,
.tags-table td.actions {
text-align: right;
width: 0;
}
.tags-table tbody tr:hover {
background: var(--surface-subtle);
}
.tags-table tr.editing {
background: rgba(43, 92, 255, 0.08);
}
.tags-table__label {
max-width: 24rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tags-table__swatch {
display: inline-block;
width: 1rem;
height: 1rem;
border-radius: 2px;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}
.tags-panel__error {
margin: 0.5rem 0;
color: var(--danger);
font-size: 0.8rem;
}
.tags-table__label-input {
width: 100%;
}
.tags-table__color-editor {
display: flex;
align-items: center;
gap: 0.4rem;
}
.tags-table__color-picker {
width: 2.25rem;
height: 2.25rem;
padding: 0;
border: none;
background: none;
cursor: pointer;
}
.tags-table__edit-controls {
display: flex;
justify-content: flex-end;
gap: 0.4rem;
}
.preview-workspace__message {
color: var(--muted);
font-size: 0.95rem;
}
.preview-workspace__metadata {
border: 1px solid var(--border);
border-radius: 2px;
padding: 0.75rem;
background: var(--surface);
max-height: 180px;
overflow: auto;
}
.preview-workspace__metadata h3 {
margin: 0 0 0.5rem;
font-size: 0.9rem;
}
.column {
background: transparent;
border: none;
display: flex;
flex-direction: column;
min-height: 0;
}
.column + .column {
border-left: 1px solid var(--border);
padding-left: 0.6rem;
}
.column-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 0 0 0.5rem;
border-bottom: 1px solid var(--border);
}
.column-header__titles {
display: flex;
flex-direction: column;
gap: 0.3rem;
}
.breadcrumb {
display: flex;
align-items: center;
gap: 0.3rem;
font-size: 0.85rem;
color: var(--muted);
}
.breadcrumb-item {
display: inline-flex;
align-items: center;
gap: 0.3rem;
}
.breadcrumb-item a {
text-decoration: none;
color: var(--accent);
}
.breadcrumb-item a:hover,
.breadcrumb-item a:focus {
text-decoration: underline;
}
.breadcrumb-current {
font-weight: 600;
color: var(--fg);
}
.breadcrumb-separator {
color: var(--muted);
}
.column-header h2 {
margin: 0;
font-size: 0.9rem;
font-weight: 600;
}
.column-subtitle {
margin-top: 0.25rem;
font-size: 0.78rem;
color: var(--muted);
}
.column-body {
flex: 1;
display: flex;
flex-direction: column;
gap: 0.32rem;
padding: 0.35rem 0 0.55rem;
min-height: 0;
}
.column-body.scrollable {
overflow-y: auto;
}
.folder-tree {
list-style: none;
margin: 0;
padding: 0;
}
.folder-node {
margin: 0;
}
.folder-row {
display: flex;
align-items: center;
gap: 0.22rem;
padding: 0.16rem 0.26rem;
border-radius: 2px;
cursor: pointer;
color: var(--fg);
transition: background 0.12s ease, color 0.12s ease;
font-size: 0.78rem;
}
.folder-row span.name {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.folder-row:hover {
background: var(--surface-subtle);
}
.folder-row.active {
background: rgba(43, 92, 255, 0.12);
color: var(--fg);
}
.folder-row .toggle {
width: 1.05rem;
display: inline-flex;
align-items: center;
justify-content: center;
user-select: none;
flex-shrink: 0;
transition: transform 0.18s ease;
}
.folder-row .toggle.invisible {
visibility: hidden;
}
.toggle-icon {
width: 0.9rem;
height: 0.9rem;
transition: transform 0.18s ease;
}
.folder-row .toggle.expanded .toggle-icon {
transform: rotate(90deg);
}
.folder-row .icon-button {
opacity: 0;
pointer-events: none;
transition: opacity 0.12s ease;
margin-left: auto;
}
.folder-row:hover .icon-button,
.folder-row:focus-within .icon-button {
opacity: 1;
pointer-events: auto;
}
.folder-children {
list-style: none;
margin: 0 0 0 0.45rem;
padding: 0;
}
.sidebar-section {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.sidebar-section__header {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 0.75rem;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.04em;
}
.sidebar-section__header h3 {
margin: 0;
font-size: 0.75rem;
font-weight: 600;
color: inherit;
}
.sidebar-link {
border: none;
background: transparent;
padding: 0.3rem 0.3rem;
text-align: left;
font-size: 0.82rem;
color: var(--fg);
border-radius: 3px;
cursor: pointer;
transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-link:hover {
background: var(--surface-subtle);
}
.sidebar-link.active {
background: rgba(43, 92, 255, 0.12);
color: var(--accent);
font-weight: 600;
}
.folder-row.is-drop-target {
outline: 2px dashed var(--accent);
outline-offset: 2px;
}
.documents-panel .column-header {
display: flex;
align-items: center;
justify-content: space-between;
}
.documents-panel .column-header .header-actions {
display: flex;
gap: 0.5rem;
}
.documents-panel .column-body {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.documents-panel .column-toolbar {
flex-shrink: 0;
padding-bottom: 0.4rem;
border-bottom: 1px solid var(--border);
}
.documents-panel .documents-scroll {
flex: 1;
overflow-y: auto;
border: none;
background: transparent;
min-height: 0;
padding-right: 0.3rem;
}
.documents-panel table {
width: 100%;
border-collapse: collapse;
font-size: 0.88rem;
margin-top: 0.4rem;
}
.documents-panel thead th {
border-bottom: 1px solid var(--border);
background-color: var(--bg);
position: sticky;
top: 0;
z-index: 1;
padding: 0.45rem 0.6rem;
font-size: 0.75rem;
letter-spacing: 0.04em;
text-transform: uppercase;
color: var(--muted);
}
.documents-panel th,
.documents-panel td {
padding: 0.45rem 0.6rem;
text-align: left;
}
.documents-panel th.thumb-column,
.documents-panel td.thumb-cell {
width: 54px;
text-align: center;
}
.document-thumbnail {
width: 36px;
height: 48px;
object-fit: cover;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
}
.thumb-placeholder {
width: 36px;
height: 48px;
border-radius: 0;
color: var(--muted);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 0.68rem;
font-weight: 600;
letter-spacing: 0.08em;
}
.thumb-placeholder.icon {
font-size: 1.8rem;
color: var(--accent);
width: 36px;
height: 48px;
}
.thumb-placeholder.icon svg {
width: 32px;
height: 32px;
}
.documents-panel th.actions-column,
.documents-panel td.actions {
width: 1%;
white-space: nowrap;
}
.documents-panel tbody tr {
background: transparent;
border-bottom: 1px solid var(--border);
transition: background 0.15s ease;
}
.documents-panel tbody tr:last-child {
border-bottom: none;
}
.documents-panel tbody tr:hover {
background: var(--surface-subtle);
}
.documents-panel tbody tr.folder {
cursor: pointer;
font-weight: 600;
}
.documents-panel tbody tr.document {
cursor: pointer;
}
.documents-panel tbody tr.document.selected {
background: rgba(43, 92, 255, 0.12);
box-shadow: inset 2px 0 0 rgba(43, 92, 255, 0.9);
}
.documents-panel tbody tr.document,
.documents-panel tbody tr.document * {
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
}
.documents-panel tbody tr.document.focused:not(.selected) {
box-shadow: inset 2px 0 0 rgba(43, 92, 255, 0.45);
}
.doc-name {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.doc-name__title {
font-weight: 600;
}
.doc-name__tags {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
}
.documents-panel tbody tr.document.dragging {
opacity: 0.4;
}
.filter-bar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.32rem;
margin-bottom: 0.5rem;
}
.filter-bar input[type='search'] {
flex: 1;
min-width: 180px;
}
.tag-filters {
display: flex;
flex-wrap: wrap;
gap: 0.32rem;
}
.tag-filter {
border: 1px solid var(--border);
background: var(--surface-subtle);
color: var(--fg);
padding: 0.25rem 0.6rem;
border-radius: 2px;
cursor: pointer;
font-size: 0.85rem;
transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.tag-filter:hover {
filter: brightness(0.97);
}
.tag-filter.active {
box-shadow: 0 0 0 1px currentColor inset;
transform: translateY(-1px);
}
.filter-actions {
display: flex;
gap: 0.32rem;
}
.search-hint {
margin-top: 0.75rem;
font-size: 0.85rem;
color: var(--muted);
}
.badge {
display: inline-flex;
align-items: center;
padding: 0.15rem 0.35rem;
border-radius: 2px;
background: var(--surface-subtle);
color: var(--fg);
font-size: 0.74rem;
border: 1px solid transparent;
}
.tag-chip {
gap: 0.25rem;
}
.empty-state {
border: 1px dashed var(--border);
border-radius: 0;
text-align: center;
padding: 1.1rem 0.9rem;
color: var(--muted);
margin-top: 0.75rem;
background: var(--surface-subtle);
}
.detail-panel {
position: relative;
}
.detail-panel .column-body {
gap: 1rem;
}
.detail-panel .column-body.scrollable {
overflow-y: auto;
}
.detail-actions {
display: flex;
gap: 0.32rem;
margin: 0.6rem 0;
}
.preview-pane {
margin-top: 0.4rem;
border: none;
border-radius: 0;
background: transparent;
min-height: 220px;
display: flex;
align-items: center;
justify-content: center;
overflow: visible;
}
.thumbnail-preview {
display: flex;
flex-direction: column;
gap: 0.32rem;
margin: 0.4rem 0 0.6rem;
}
.thumbnail-image {
max-width: 100%;
border-radius: 0;
box-shadow: none;
}
.detail-panel .meta {
font-size: 0.9rem;
color: var(--muted);
}
.detail-panel .doc-title-row {
display: flex;
align-items: center;
gap: 0.4rem;
margin: 0.25rem 0 0.5rem;
}
.detail-panel .doc-title-edit {
display: flex;
align-items: center;
gap: 0.4rem;
width: 100%;
}
.detail-panel .doc-title-edit input {
flex: 1;
min-width: 0;
}
.status-inline {
font-size: 0.85rem;
margin-top: 0.2rem;
}
.status-inline.error {
color: var(--danger);
}
.bulk-detail-actions {
display: flex;
flex-direction: column;
gap: 0.5rem;
margin: 0.6rem 0;
}
.bulk-detail-actions .inline {
display: flex;
gap: 0.4rem;
}
.bulk-move {
display: flex;
flex-direction: column;
gap: 0.3rem;
margin: 0.6rem 0;
}
.bulk-move select {
max-width: 100%;
}
.preview-stack {
position: relative;
display: flex;
align-items: center;
justify-content: center;
}
.preview-stack--stacked {
width: 100%;
min-height: 420px;
flex-shrink: 0;
}
.preview-stack__item {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
transition: transform 120ms ease;
filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
transform-origin: center;
border-radius: 6px;
overflow: hidden;
pointer-events: none;
}
.preview-stack .preview-stack__item.orientation-portrait {
width: 80%;
height: 100%;
}
.preview-stack .preview-stack__item.orientation-landscape {
width: 100%;
height: 80%;
}
.preview-stack__image {
display: block;
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
object-fit: contain;
background: transparent;
cursor: pointer;
transition:
outline-color 120ms ease,
box-shadow 120ms ease,
filter 120ms ease,
background-color 120ms ease;
outline: 2px solid transparent;
outline-offset: -2px;
pointer-events: auto;
}
.preview-stack__image:hover,
.preview-stack__image:focus-visible {
outline-color: rgba(24, 119, 242, 0.85);
box-shadow:
inset 0 0 0 999px rgba(24, 119, 242, 0.18),
0 6px 18px rgba(24, 119, 242, 0.24);
filter: saturate(118%) brightness(1.05);
}
.preview-pane--stack {
min-height: 260px;
}
.bulk-tags {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
margin: 0.4rem 0 0.6rem;
}
.detail-panel dl {
margin: 0;
}
.detail-panel dt {
font-weight: 600;
margin-top: 0.8rem;
}
.detail-panel dd {
margin: 0.2rem 0 0;
}
.detail-panel .tag-list {
display: flex;
flex-wrap: wrap;
gap: 0.3rem;
margin-top: 0.5rem;
}
.tag-pill {
display: inline-flex;
align-items: center;
gap: 0.18rem;
background: var(--surface-subtle);
color: var(--fg);
padding: 0.2rem 0.45rem;
border-radius: 2px;
font-size: 0.78rem;
border: 1px solid var(--border);
}
.tag-pill button {
background: none;
border: none;
color: inherit;
padding: 0;
cursor: pointer;
font-size: 0.85rem;
opacity: 0.8;
}
.tag-pill button:hover {
opacity: 1;
}
input,
textarea,
select {
font: inherit;
border-radius: 2px;
border: 1px solid var(--border);
padding: 0.4rem 0.5rem;
background: var(--surface);
color: inherit;
width: 100%;
box-sizing: border-box;
}
input:focus,
textarea:focus,
select:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 2px var(--accent-soft);
background: var(--surface);
}
textarea {
resize: vertical;
}
form.inline {
display: flex;
gap: 0.32rem;
margin-top: 0.5rem;
}
.status-banner {
padding: 0.45rem 0.8rem;
border-radius: 2px;
font-size: 0.85rem;
margin-bottom: 0.8rem;
}
.status-banner.info {
background: var(--surface-subtle);
color: var(--muted);
}
.status-banner.success {
background: rgba(18, 128, 90, 0.1);
color: var(--success);
}
.status-banner.error {
background: rgba(217, 44, 32, 0.1);
color: var(--danger);
}
.drop-overlay {
position: fixed;
inset: 0;
background: rgba(43, 92, 255, 0.12);
backdrop-filter: blur(4px);
display: none;
align-items: center;
justify-content: center;
z-index: 9999;
}
.drop-overlay.active {
display: flex;
}
.drop-overlay__content {
background: var(--surface);
color: var(--fg);
padding: 1.25rem 1.75rem;
border-radius: 2px;
text-align: center;
font-size: 0.95rem;
box-shadow: none;
border: 1px solid var(--border);
}
@media (max-width: 1080px) {
.app-main {
grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
grid-template-rows: auto auto;
}
.detail-panel {
grid-column: 1 / -1;
}
}
@media (max-width: 768px) {
.app-bar {
flex-direction: column;
align-items: flex-start;
gap: 0.75rem;
}
.app-main {
grid-template-columns: 1fr;
}
.sidebar,
.documents-panel,
.detail-panel {
min-height: auto;
}
}
.sidebar .column-body {
gap: 0.28rem;
}
.new-folder-form {
display: flex;
gap: 0.45rem;
}
.folder-tree-scroller {
flex: 1;
overflow-y: auto;
padding-right: 0.4rem;
margin-right: -0.4rem;
min-height: 0;
}
.login-screen {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg);
padding: 2rem;
}
.login-card {
width: min(340px, 100%);
background: var(--surface);
border: 1px solid var(--border);
border-radius: 2px;
padding: 1.75rem;
box-shadow: none;
display: flex;
flex-direction: column;
gap: 1rem;
}
.login-card h1 {
margin: 0;
font-size: 1.6rem;
font-weight: 600;
}
.login-card p {
margin: 0;
color: var(--muted);
font-size: 0.9rem;
}
.login-card form {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.login-card label {
font-size: 0.85rem;
font-weight: 600;
color: var(--muted);
}
.login-card .status-banner {
margin-bottom: 0;
}
.column-toolbar .filter-bar {
margin-bottom: 0;
}