app.css
| 1 | /* Theme palettes. The base is light; dark is applied either by the OS |
| 2 | preference (theme = auto, the default) or forced by the theme toggle, |
| 3 | which puts `light`/`dark` on <html> (see web/src/theme.rs). Keep the two |
| 4 | dark blocks in sync. */ |
| 5 | :root { |
| 6 | color-scheme: light; |
| 7 | --bg: #f6f7f9; |
| 8 | --panel: #ffffff; |
| 9 | --text: #1a1d21; |
| 10 | --muted: #6b7280; |
| 11 | --accent: #3b82f6; |
| 12 | --accent-hover: #2563eb; |
| 13 | --danger: #ef4444; |
| 14 | --border: #e5e7eb; |
| 15 | --topbar-h: 48px; |
| 16 | } |
| 17 | |
| 18 | :root.dark { |
| 19 | color-scheme: dark; |
| 20 | --bg: #0f1115; |
| 21 | --panel: #171a20; |
| 22 | --text: #e5e7eb; |
| 23 | --muted: #9ca3af; |
| 24 | --accent: #60a5fa; |
| 25 | --accent-hover: #3b82f6; |
| 26 | --danger: #f87171; |
| 27 | --border: #2a2f3a; |
| 28 | } |
| 29 | |
| 30 | @media (prefers-color-scheme: dark) { |
| 31 | :root:not(.light) { |
| 32 | color-scheme: dark; |
| 33 | --bg: #0f1115; |
| 34 | --panel: #171a20; |
| 35 | --text: #e5e7eb; |
| 36 | --muted: #9ca3af; |
| 37 | --accent: #60a5fa; |
| 38 | --accent-hover: #3b82f6; |
| 39 | --danger: #f87171; |
| 40 | --border: #2a2f3a; |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | * { |
| 45 | box-sizing: border-box; |
| 46 | /* The design language is sharp: everything stays square. */ |
| 47 | border-radius: 0; |
| 48 | } |
| 49 | |
| 50 | body { |
| 51 | margin: 0; |
| 52 | font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; |
| 53 | background: var(--bg); |
| 54 | color: var(--text); |
| 55 | font-size: 15px; |
| 56 | } |
| 57 | |
| 58 | .muted { |
| 59 | color: var(--muted); |
| 60 | } |
| 61 | |
| 62 | .card { |
| 63 | background: var(--panel); |
| 64 | border: 1px solid var(--border); |
| 65 | padding: 24px; |
| 66 | } |
| 67 | |
| 68 | .center-screen { |
| 69 | min-height: 100vh; |
| 70 | display: flex; |
| 71 | flex-direction: column; |
| 72 | align-items: center; |
| 73 | justify-content: center; |
| 74 | padding: 16px; |
| 75 | text-align: center; |
| 76 | } |
| 77 | |
| 78 | .auth-card { |
| 79 | width: 100%; |
| 80 | max-width: 380px; |
| 81 | } |
| 82 | |
| 83 | .auth-card h1 { |
| 84 | margin: 0 0 8px; |
| 85 | font-size: 22px; |
| 86 | } |
| 87 | |
| 88 | .auth-logo { |
| 89 | width: 44px; |
| 90 | height: 44px; |
| 91 | margin-bottom: 12px; |
| 92 | } |
| 93 | |
| 94 | .auth-card p { |
| 95 | margin: 0 0 20px; |
| 96 | font-size: 13px; |
| 97 | } |
| 98 | |
| 99 | .field { |
| 100 | display: block; |
| 101 | margin-bottom: 14px; |
| 102 | } |
| 103 | |
| 104 | .field span { |
| 105 | display: block; |
| 106 | font-size: 13px; |
| 107 | color: var(--muted); |
| 108 | margin-bottom: 4px; |
| 109 | } |
| 110 | |
| 111 | input { |
| 112 | width: 100%; |
| 113 | padding: 10px 12px; |
| 114 | border: 1px solid var(--border); |
| 115 | background: var(--bg); |
| 116 | color: var(--text); |
| 117 | font-size: 14px; |
| 118 | } |
| 119 | |
| 120 | input:focus { |
| 121 | outline: 2px solid var(--accent); |
| 122 | outline-offset: -1px; |
| 123 | } |
| 124 | |
| 125 | button { |
| 126 | font: inherit; |
| 127 | cursor: pointer; |
| 128 | display: inline-flex; |
| 129 | align-items: center; |
| 130 | justify-content: center; |
| 131 | gap: 6px; |
| 132 | border: 1px solid var(--border); |
| 133 | background: var(--panel); |
| 134 | color: var(--text); |
| 135 | padding: 9px 14px; |
| 136 | } |
| 137 | |
| 138 | button:hover { |
| 139 | border-color: var(--muted); |
| 140 | } |
| 141 | |
| 142 | button:disabled { |
| 143 | opacity: 0.6; |
| 144 | cursor: default; |
| 145 | } |
| 146 | |
| 147 | .btn-primary { |
| 148 | width: 100%; |
| 149 | background: var(--accent); |
| 150 | border-color: var(--accent); |
| 151 | color: #fff; |
| 152 | font-weight: 600; |
| 153 | } |
| 154 | |
| 155 | .btn-primary:hover { |
| 156 | background: var(--accent-hover); |
| 157 | border-color: var(--accent-hover); |
| 158 | } |
| 159 | |
| 160 | .error { |
| 161 | color: var(--danger); |
| 162 | font-size: 13px; |
| 163 | min-height: 18px; |
| 164 | margin: 0 0 10px; |
| 165 | } |
| 166 | |
| 167 | /* layout (signed-in): full-width topbar, then sidebar + content below */ |
| 168 | |
| 169 | .layout { |
| 170 | min-height: 100vh; |
| 171 | display: flex; |
| 172 | flex-direction: column; |
| 173 | } |
| 174 | |
| 175 | .topbar { |
| 176 | flex: none; |
| 177 | position: sticky; |
| 178 | top: 0; |
| 179 | z-index: 130; |
| 180 | height: var(--topbar-h); |
| 181 | display: flex; |
| 182 | align-items: center; |
| 183 | justify-content: space-between; |
| 184 | gap: 12px; |
| 185 | padding: 0 16px; |
| 186 | background: var(--panel); |
| 187 | border-bottom: 1px solid var(--border); |
| 188 | } |
| 189 | |
| 190 | .topbar-left { |
| 191 | display: flex; |
| 192 | align-items: center; |
| 193 | gap: 10px; |
| 194 | min-width: 0; |
| 195 | } |
| 196 | |
| 197 | .icon-btn.nav-toggle { |
| 198 | display: none; |
| 199 | } |
| 200 | |
| 201 | .topbar-right { |
| 202 | display: flex; |
| 203 | align-items: center; |
| 204 | gap: 12px; |
| 205 | } |
| 206 | |
| 207 | .body-row { |
| 208 | flex: 1; |
| 209 | display: flex; |
| 210 | align-items: stretch; |
| 211 | } |
| 212 | |
| 213 | /* ---- sidebar ---- */ |
| 214 | |
| 215 | .sidebar { |
| 216 | flex: none; |
| 217 | width: 224px; |
| 218 | display: flex; |
| 219 | flex-direction: column; |
| 220 | background: var(--panel); |
| 221 | border-right: 1px solid var(--border); |
| 222 | position: sticky; |
| 223 | top: var(--topbar-h); |
| 224 | height: calc(100vh - var(--topbar-h)); |
| 225 | } |
| 226 | |
| 227 | .brand { |
| 228 | display: flex; |
| 229 | align-items: center; |
| 230 | gap: 10px; |
| 231 | font-weight: 700; |
| 232 | white-space: nowrap; |
| 233 | } |
| 234 | |
| 235 | .brand-name { |
| 236 | overflow: hidden; |
| 237 | text-overflow: ellipsis; |
| 238 | } |
| 239 | |
| 240 | .logo { |
| 241 | width: 26px; |
| 242 | height: 26px; |
| 243 | flex: none; |
| 244 | display: block; |
| 245 | } |
| 246 | |
| 247 | .nav { |
| 248 | flex: 1; |
| 249 | overflow-y: auto; |
| 250 | padding: 14px 8px 16px; |
| 251 | display: flex; |
| 252 | flex-direction: column; |
| 253 | gap: 20px; |
| 254 | } |
| 255 | |
| 256 | .nav-section-label { |
| 257 | font-size: 11px; |
| 258 | font-weight: 700; |
| 259 | text-transform: uppercase; |
| 260 | letter-spacing: 0.08em; |
| 261 | color: var(--muted); |
| 262 | padding: 0 10px 6px; |
| 263 | } |
| 264 | |
| 265 | .nav-tab { |
| 266 | display: flex; |
| 267 | align-items: center; |
| 268 | justify-content: flex-start; |
| 269 | gap: 10px; |
| 270 | width: 100%; |
| 271 | margin-bottom: 2px; |
| 272 | padding: 8px 10px; |
| 273 | text-align: left; |
| 274 | background: none; |
| 275 | border: none; |
| 276 | color: var(--muted); |
| 277 | font-size: 14px; |
| 278 | } |
| 279 | |
| 280 | .nav-tab:hover { |
| 281 | background: var(--bg); |
| 282 | color: var(--text); |
| 283 | } |
| 284 | |
| 285 | .nav-tab.active { |
| 286 | background: var(--accent); |
| 287 | border-color: var(--accent); |
| 288 | color: #fff; |
| 289 | } |
| 290 | |
| 291 | .ic-tab { |
| 292 | width: 18px; |
| 293 | height: 18px; |
| 294 | flex: none; |
| 295 | } |
| 296 | |
| 297 | .nav-tab.active .icon { |
| 298 | color: #fff; |
| 299 | } |
| 300 | |
| 301 | .nav-tab-name { |
| 302 | flex: 1; |
| 303 | min-width: 0; |
| 304 | overflow: hidden; |
| 305 | text-overflow: ellipsis; |
| 306 | white-space: nowrap; |
| 307 | } |
| 308 | |
| 309 | .nav-tab-note { |
| 310 | flex: none; |
| 311 | font-size: 10px; |
| 312 | font-weight: 700; |
| 313 | padding: 1px 5px; |
| 314 | background: var(--bg); |
| 315 | border: 1px solid var(--border); |
| 316 | color: var(--muted); |
| 317 | } |
| 318 | |
| 319 | .nav-tab.active .nav-tab-note { |
| 320 | background: rgb(255 255 255 / 18%); |
| 321 | border-color: rgb(255 255 255 / 30%); |
| 322 | color: #fff; |
| 323 | } |
| 324 | |
| 325 | .nav-backdrop { |
| 326 | display: none; |
| 327 | } |
| 328 | |
| 329 | .user-badge { |
| 330 | font-size: 14px; |
| 331 | } |
| 332 | |
| 333 | .badge { |
| 334 | font-size: 11px; |
| 335 | padding: 2px 8px; |
| 336 | background: var(--bg); |
| 337 | border: 1px solid var(--border); |
| 338 | color: var(--muted); |
| 339 | } |
| 340 | |
| 341 | .content { |
| 342 | flex: 1; |
| 343 | min-width: 0; |
| 344 | display: flex; |
| 345 | flex-direction: column; |
| 346 | padding: 20px; |
| 347 | } |
| 348 | |
| 349 | /* Narrow screens: the sidebar becomes an off-canvas drawer that only |
| 350 | covers the content, below the (always visible) topbar. */ |
| 351 | @media (max-width: 860px) { |
| 352 | .sidebar { |
| 353 | position: fixed; |
| 354 | top: var(--topbar-h); |
| 355 | bottom: 0; |
| 356 | left: 0; |
| 357 | right: auto; |
| 358 | height: auto; |
| 359 | z-index: 120; |
| 360 | transform: translateX(-100%); |
| 361 | transition: transform 0.15s ease; |
| 362 | } |
| 363 | |
| 364 | .sidebar.open { |
| 365 | transform: translateX(0); |
| 366 | box-shadow: 0 0 48px rgb(0 0 0 / 35%); |
| 367 | } |
| 368 | |
| 369 | .nav-backdrop { |
| 370 | display: block; |
| 371 | position: fixed; |
| 372 | top: var(--topbar-h); |
| 373 | bottom: 0; |
| 374 | left: 0; |
| 375 | right: 0; |
| 376 | z-index: 110; |
| 377 | background: rgb(0 0 0 / 40%); |
| 378 | } |
| 379 | |
| 380 | .icon-btn.nav-toggle { |
| 381 | display: inline-flex; |
| 382 | } |
| 383 | |
| 384 | .content { |
| 385 | padding: 14px; |
| 386 | } |
| 387 | } |
| 388 | |
| 389 | /* ---- file browser ---- */ |
| 390 | |
| 391 | .browser { |
| 392 | width: 100%; |
| 393 | max-width: 1200px; |
| 394 | margin: 0 auto; |
| 395 | flex: 1; |
| 396 | display: flex; |
| 397 | flex-direction: column; |
| 398 | min-height: 0; |
| 399 | } |
| 400 | |
| 401 | .icon { |
| 402 | width: 20px; |
| 403 | height: 20px; |
| 404 | display: inline-block; |
| 405 | vertical-align: middle; |
| 406 | } |
| 407 | |
| 408 | .ic-folder { |
| 409 | color: var(--accent); |
| 410 | } |
| 411 | |
| 412 | .ic-muted { |
| 413 | color: var(--muted); |
| 414 | } |
| 415 | |
| 416 | .crumbs { |
| 417 | display: flex; |
| 418 | align-items: center; |
| 419 | gap: 2px; |
| 420 | padding: 6px 0 12px; |
| 421 | font-size: 15px; |
| 422 | flex-wrap: wrap; |
| 423 | } |
| 424 | |
| 425 | .crumb { |
| 426 | cursor: pointer; |
| 427 | color: var(--muted); |
| 428 | padding: 3px 6px; |
| 429 | } |
| 430 | |
| 431 | .crumb:hover { |
| 432 | color: var(--text); |
| 433 | background: var(--panel); |
| 434 | } |
| 435 | |
| 436 | .crumb.current { |
| 437 | color: var(--text); |
| 438 | font-weight: 600; |
| 439 | cursor: default; |
| 440 | background: none; |
| 441 | } |
| 442 | |
| 443 | .crumb-sep { |
| 444 | color: var(--muted); |
| 445 | padding: 0 1px; |
| 446 | } |
| 447 | |
| 448 | .toolbar { |
| 449 | display: flex; |
| 450 | align-items: center; |
| 451 | justify-content: space-between; |
| 452 | gap: 6px; |
| 453 | padding-bottom: 12px; |
| 454 | } |
| 455 | |
| 456 | .toolbar-right { |
| 457 | display: flex; |
| 458 | gap: 6px; |
| 459 | } |
| 460 | |
| 461 | .icon-btn { |
| 462 | padding: 7px 9px; |
| 463 | border: 1px solid var(--border); |
| 464 | background: var(--panel); |
| 465 | color: var(--muted); |
| 466 | display: inline-flex; |
| 467 | align-items: center; |
| 468 | } |
| 469 | |
| 470 | .icon-btn:hover { |
| 471 | border-color: var(--muted); |
| 472 | } |
| 473 | |
| 474 | .icon-btn.active { |
| 475 | background: var(--accent); |
| 476 | border-color: var(--accent); |
| 477 | color: #fff; |
| 478 | } |
| 479 | |
| 480 | .ic-btn { |
| 481 | width: 18px; |
| 482 | height: 18px; |
| 483 | color: inherit; |
| 484 | } |
| 485 | |
| 486 | .entries-area { |
| 487 | flex: 1; |
| 488 | min-height: 240px; |
| 489 | } |
| 490 | |
| 491 | .center-note { |
| 492 | text-align: center; |
| 493 | padding: 48px 0; |
| 494 | } |
| 495 | |
| 496 | .error-card { |
| 497 | display: flex; |
| 498 | align-items: center; |
| 499 | justify-content: space-between; |
| 500 | gap: 16px; |
| 501 | color: var(--danger); |
| 502 | font-size: 14px; |
| 503 | } |
| 504 | |
| 505 | /* root tiles were replaced by the sidebar's folder tabs */ |
| 506 | |
| 507 | /* grid view */ |
| 508 | |
| 509 | .entries-grid { |
| 510 | display: grid; |
| 511 | grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); |
| 512 | gap: 10px; |
| 513 | } |
| 514 | |
| 515 | .tile { |
| 516 | background: var(--panel); |
| 517 | border: 1px solid var(--border); |
| 518 | padding: 16px 10px 12px; |
| 519 | text-align: center; |
| 520 | cursor: pointer; |
| 521 | } |
| 522 | |
| 523 | .tile:hover { |
| 524 | border-color: var(--muted); |
| 525 | } |
| 526 | |
| 527 | .tile-icon { |
| 528 | width: 42px; |
| 529 | height: 42px; |
| 530 | margin: 0 auto 10px; |
| 531 | display: block; |
| 532 | } |
| 533 | |
| 534 | .tile-name { |
| 535 | font-size: 13px; |
| 536 | line-height: 1.3; |
| 537 | word-break: break-word; |
| 538 | } |
| 539 | |
| 540 | /* list view */ |
| 541 | |
| 542 | .entries-list { |
| 543 | background: var(--panel); |
| 544 | border: 1px solid var(--border); |
| 545 | overflow: hidden; |
| 546 | } |
| 547 | |
| 548 | .row { |
| 549 | display: grid; |
| 550 | grid-template-columns: 28px minmax(0, 1fr) 90px 150px; |
| 551 | gap: 12px; |
| 552 | align-items: center; |
| 553 | padding: 9px 14px; |
| 554 | border-bottom: 1px solid var(--border); |
| 555 | cursor: pointer; |
| 556 | font-size: 14px; |
| 557 | } |
| 558 | |
| 559 | .row:last-child { |
| 560 | border-bottom: none; |
| 561 | } |
| 562 | |
| 563 | .row:hover { |
| 564 | background: var(--bg); |
| 565 | } |
| 566 | |
| 567 | .row-icon { |
| 568 | width: 20px; |
| 569 | height: 20px; |
| 570 | } |
| 571 | |
| 572 | .row-name { |
| 573 | overflow: hidden; |
| 574 | text-overflow: ellipsis; |
| 575 | white-space: nowrap; |
| 576 | } |
| 577 | |
| 578 | .row-size, |
| 579 | .row-date { |
| 580 | font-size: 13px; |
| 581 | text-align: right; |
| 582 | } |
| 583 | |
| 584 | @media (max-width: 640px) { |
| 585 | .row { |
| 586 | grid-template-columns: 28px minmax(0, 1fr) 90px; |
| 587 | } |
| 588 | |
| 589 | .row-date { |
| 590 | display: none; |
| 591 | } |
| 592 | } |
| 593 | |
| 594 | /* context menu */ |
| 595 | |
| 596 | .ctx-menu { |
| 597 | position: fixed; |
| 598 | z-index: 100; |
| 599 | min-width: 190px; |
| 600 | background: var(--panel); |
| 601 | border: 1px solid var(--border); |
| 602 | padding: 5px; |
| 603 | box-shadow: 0 8px 24px rgb(0 0 0 / 18%); |
| 604 | } |
| 605 | |
| 606 | .ctx-item { |
| 607 | display: flex; |
| 608 | align-items: center; |
| 609 | gap: 10px; |
| 610 | padding: 8px 12px; |
| 611 | font-size: 14px; |
| 612 | cursor: pointer; |
| 613 | } |
| 614 | |
| 615 | .ic-ctx { |
| 616 | width: 18px; |
| 617 | height: 18px; |
| 618 | flex: none; |
| 619 | } |
| 620 | |
| 621 | .ctx-item:hover { |
| 622 | background: var(--bg); |
| 623 | } |
| 624 | |
| 625 | .ctx-item.disabled { |
| 626 | opacity: 0.45; |
| 627 | cursor: default; |
| 628 | } |
| 629 | |
| 630 | .ctx-item.disabled:hover { |
| 631 | background: none; |
| 632 | } |
| 633 | |
| 634 | /* toast */ |
| 635 | |
| 636 | .toast { |
| 637 | position: fixed; |
| 638 | bottom: 20px; |
| 639 | right: 20px; |
| 640 | z-index: 200; |
| 641 | background: var(--panel); |
| 642 | color: var(--text); |
| 643 | border: 1px solid var(--border); |
| 644 | padding: 11px 16px; |
| 645 | font-size: 14px; |
| 646 | box-shadow: 0 8px 24px rgb(0 0 0 / 18%); |
| 647 | max-width: 320px; |
| 648 | } |
| 649 | |
| 650 | |
| 651 | /* ---- modals ---- */ |
| 652 | |
| 653 | .modal-overlay { |
| 654 | position: fixed; |
| 655 | inset: 0; |
| 656 | background: rgb(0 0 0 / 45%); |
| 657 | display: flex; |
| 658 | align-items: center; |
| 659 | justify-content: center; |
| 660 | z-index: 100; |
| 661 | } |
| 662 | |
| 663 | .modal { |
| 664 | width: 440px; |
| 665 | max-width: calc(100vw - 32px); |
| 666 | padding: 20px; |
| 667 | background: var(--panel); |
| 668 | border: 1px solid var(--border); |
| 669 | box-shadow: 0 12px 44px rgb(0 0 0 / 35%); |
| 670 | } |
| 671 | |
| 672 | .modal.picker { |
| 673 | width: 520px; |
| 674 | } |
| 675 | |
| 676 | .modal-title { |
| 677 | margin: 0 0 12px; |
| 678 | font-size: 16px; |
| 679 | } |
| 680 | |
| 681 | .modal-label { |
| 682 | display: block; |
| 683 | font-size: 13px; |
| 684 | color: var(--muted); |
| 685 | margin-bottom: 6px; |
| 686 | } |
| 687 | |
| 688 | .modal .input { |
| 689 | width: 100%; |
| 690 | box-sizing: border-box; |
| 691 | margin-bottom: 16px; |
| 692 | } |
| 693 | |
| 694 | .modal-message { |
| 695 | white-space: pre-line; |
| 696 | font-size: 14px; |
| 697 | margin: 0 0 8px; |
| 698 | } |
| 699 | |
| 700 | .modal-actions { |
| 701 | display: flex; |
| 702 | justify-content: flex-end; |
| 703 | gap: 8px; |
| 704 | margin-top: 16px; |
| 705 | } |
| 706 | |
| 707 | .btn-danger { |
| 708 | background: var(--danger); |
| 709 | border-color: var(--danger); |
| 710 | color: #fff; |
| 711 | } |
| 712 | |
| 713 | .btn-danger:hover { |
| 714 | background: color-mix(in srgb, var(--danger) 85%, black); |
| 715 | } |
| 716 | |
| 717 | .btn:disabled { |
| 718 | opacity: 0.5; |
| 719 | cursor: not-allowed; |
| 720 | } |
| 721 | |
| 722 | .conflict-list { |
| 723 | max-height: 200px; |
| 724 | overflow-y: auto; |
| 725 | margin: 8px 0; |
| 726 | padding-left: 20px; |
| 727 | font-size: 13px; |
| 728 | } |
| 729 | |
| 730 | .picker-roots { |
| 731 | display: flex; |
| 732 | gap: 6px; |
| 733 | flex-wrap: wrap; |
| 734 | margin-bottom: 12px; |
| 735 | } |
| 736 | |
| 737 | .root-opt { |
| 738 | font-size: 13px; |
| 739 | } |
| 740 | |
| 741 | .root-opt.active { |
| 742 | background: var(--accent); |
| 743 | border-color: var(--accent); |
| 744 | color: #fff; |
| 745 | } |
| 746 | |
| 747 | .picker-current { |
| 748 | font-size: 13px; |
| 749 | margin: 0 0 8px; |
| 750 | } |
| 751 | |
| 752 | .picker-crumbs { |
| 753 | margin-bottom: 8px; |
| 754 | } |
| 755 | |
| 756 | .picker-entries { |
| 757 | max-height: 240px; |
| 758 | overflow-y: auto; |
| 759 | border: 1px solid var(--border); |
| 760 | } |
| 761 | |
| 762 | .picker-row { |
| 763 | display: flex; |
| 764 | align-items: center; |
| 765 | gap: 10px; |
| 766 | padding: 8px 12px; |
| 767 | cursor: pointer; |
| 768 | } |
| 769 | |
| 770 | .picker-row:hover { |
| 771 | background: var(--bg); |
| 772 | } |
| 773 | |
| 774 | /* --------------------------------------------------------------------------- |
| 775 | * Preview modal (image / PDF / video / audio / text) |
| 776 | * ------------------------------------------------------------------------- */ |
| 777 | .preview-modal { |
| 778 | width: min(960px, calc(100vw - 48px)); |
| 779 | height: min(720px, calc(100vh - 48px)); |
| 780 | display: flex; |
| 781 | flex-direction: column; |
| 782 | padding: 0; |
| 783 | overflow: hidden; |
| 784 | } |
| 785 | .preview-head { |
| 786 | display: flex; |
| 787 | align-items: center; |
| 788 | justify-content: space-between; |
| 789 | gap: 12px; |
| 790 | padding: 10px 14px; |
| 791 | border-bottom: 1px solid var(--border); |
| 792 | } |
| 793 | .preview-title { |
| 794 | font-weight: 600; |
| 795 | font-size: 14px; |
| 796 | white-space: nowrap; |
| 797 | overflow: hidden; |
| 798 | text-overflow: ellipsis; |
| 799 | } |
| 800 | .preview-close { |
| 801 | flex: none; |
| 802 | display: inline-flex; |
| 803 | align-items: center; |
| 804 | justify-content: center; |
| 805 | border: none; |
| 806 | background: transparent; |
| 807 | color: var(--muted); |
| 808 | cursor: pointer; |
| 809 | padding: 4px; |
| 810 | } |
| 811 | |
| 812 | .preview-close:hover { |
| 813 | background: var(--bg); |
| 814 | color: var(--text); |
| 815 | } |
| 816 | |
| 817 | .ic-close { |
| 818 | width: 20px; |
| 819 | height: 20px; |
| 820 | } |
| 821 | .preview-body { |
| 822 | flex: 1; |
| 823 | min-height: 0; |
| 824 | overflow: auto; |
| 825 | display: flex; |
| 826 | background: var(--bg); |
| 827 | } |
| 828 | .preview-img { |
| 829 | max-width: 100%; |
| 830 | max-height: 100%; |
| 831 | display: block; |
| 832 | margin: auto; |
| 833 | } |
| 834 | .preview-pdf { |
| 835 | width: 100%; |
| 836 | height: 100%; |
| 837 | border: none; |
| 838 | background: #fff; |
| 839 | } |
| 840 | .preview-video { |
| 841 | width: 100%; |
| 842 | max-height: 100%; |
| 843 | background: #000; |
| 844 | } |
| 845 | .preview-audio { |
| 846 | display: flex; |
| 847 | align-items: center; |
| 848 | justify-content: center; |
| 849 | width: 100%; |
| 850 | padding: 24px; |
| 851 | } |
| 852 | .preview-audio audio { |
| 853 | width: 100%; |
| 854 | max-width: 480px; |
| 855 | } |
| 856 | |
| 857 | /* CodeMirror text preview */ |
| 858 | .cm-wrap { |
| 859 | position: relative; |
| 860 | width: 100%; |
| 861 | height: 100%; |
| 862 | } |
| 863 | .cm-container { |
| 864 | height: 100%; |
| 865 | } |
| 866 | .cm-container .cm-editor { |
| 867 | height: 100%; |
| 868 | } |
| 869 | .cm-error { |
| 870 | position: absolute; |
| 871 | inset: 0; |
| 872 | display: flex; |
| 873 | align-items: center; |
| 874 | justify-content: center; |
| 875 | padding: 24px; |
| 876 | text-align: center; |
| 877 | } |
| 878 | |
| 879 | /* --------------------------------------------------------------------------- |
| 880 | * Text editor (milestone 5) |
| 881 | * ------------------------------------------------------------------------- */ |
| 882 | .editor-modal { |
| 883 | width: min(960px, calc(100vw - 48px)); |
| 884 | height: min(720px, calc(100vh - 48px)); |
| 885 | display: flex; |
| 886 | flex-direction: column; |
| 887 | padding: 0; |
| 888 | overflow: hidden; |
| 889 | } |
| 890 | .editor-head { |
| 891 | display: flex; |
| 892 | align-items: center; |
| 893 | justify-content: space-between; |
| 894 | gap: 12px; |
| 895 | padding: 10px 14px; |
| 896 | border-bottom: 1px solid var(--border); |
| 897 | } |
| 898 | .editor-title { |
| 899 | font-weight: 600; |
| 900 | font-size: 14px; |
| 901 | white-space: nowrap; |
| 902 | overflow: hidden; |
| 903 | text-overflow: ellipsis; |
| 904 | } |
| 905 | .editor-actions { |
| 906 | display: flex; |
| 907 | align-items: center; |
| 908 | gap: 10px; |
| 909 | flex: none; |
| 910 | } |
| 911 | .editor-body { |
| 912 | flex: 1; |
| 913 | min-height: 0; |
| 914 | display: flex; |
| 915 | position: relative; |
| 916 | background: var(--bg); |
| 917 | } |
| 918 | .editor-body .cm-container { |
| 919 | width: 100%; |
| 920 | height: 100%; |
| 921 | } |
| 922 | /* Conflict / discard dialogs render above the editor overlay. */ |
| 923 | .editor-sub-overlay { |
| 924 | z-index: 101; |
| 925 | background: rgb(0 0 0 / 25%); |
| 926 | } |
| 927 | |
| 928 | /* --------------------------------------------------------------------------- |
| 929 | * Download format dialog |
| 930 | * ------------------------------------------------------------------------- */ |
| 931 | .dl-formats { |
| 932 | display: flex; |
| 933 | flex-direction: column; |
| 934 | gap: 8px; |
| 935 | margin-bottom: 8px; |
| 936 | } |
| 937 | .dl-fmt { |
| 938 | justify-content: flex-start; |
| 939 | } |
| 940 | |
| 941 | /* --------------------------------------------------------------------------- |
| 942 | * Item info dialog |
| 943 | * ------------------------------------------------------------------------- */ |
| 944 | .info-list { |
| 945 | margin: 8px 0 16px; |
| 946 | display: grid; |
| 947 | grid-template-columns: 90px 1fr; |
| 948 | row-gap: 8px; |
| 949 | column-gap: 12px; |
| 950 | } |
| 951 | .info-list dt { |
| 952 | color: var(--muted); |
| 953 | } |
| 954 | .info-list dd { |
| 955 | margin: 0; |
| 956 | word-break: break-word; |
| 957 | } |
| 958 | |
| 959 | /* --------------------------------------------------------------------------- |
| 960 | Shares (milestone 6) |
| 961 | --------------------------------------------------------------------------- */ |
| 962 | |
| 963 | .share-modal { |
| 964 | width: 480px; |
| 965 | } |
| 966 | |
| 967 | .share-link-row { |
| 968 | display: flex; |
| 969 | gap: 8px; |
| 970 | margin: 12px 0; |
| 971 | } |
| 972 | |
| 973 | .share-link-input { |
| 974 | flex: 1; |
| 975 | font-family: ui-monospace, monospace; |
| 976 | font-size: 12.5px; |
| 977 | padding: 8px 10px; |
| 978 | border: 1px solid var(--border); |
| 979 | background: var(--bg); |
| 980 | color: var(--text); |
| 981 | min-width: 0; |
| 982 | } |
| 983 | |
| 984 | .share-check { |
| 985 | display: flex; |
| 986 | align-items: center; |
| 987 | gap: 8px; |
| 988 | margin: 4px 0 14px; |
| 989 | font-size: 14px; |
| 990 | } |
| 991 | |
| 992 | .share-check input { |
| 993 | width: 16px; |
| 994 | height: 16px; |
| 995 | } |
| 996 | |
| 997 | .share-expiry-row { |
| 998 | display: flex; |
| 999 | align-items: center; |
| 1000 | gap: 10px; |
| 1001 | margin: 0 0 10px; |
| 1002 | } |
| 1003 | |
| 1004 | .share-expiry-row label { |
| 1005 | font-size: 13px; |
| 1006 | color: var(--muted); |
| 1007 | min-width: 52px; |
| 1008 | } |
| 1009 | |
| 1010 | .share-expiry-row select, |
| 1011 | .share-expiry-row input { |
| 1012 | flex: 1; |
| 1013 | padding: 8px 10px; |
| 1014 | border: 1px solid var(--border); |
| 1015 | background: var(--panel); |
| 1016 | color: var(--text); |
| 1017 | font: inherit; |
| 1018 | } |
| 1019 | |
| 1020 | .share-expiry-note { |
| 1021 | margin: 4px 0 0; |
| 1022 | font-size: 12.5px; |
| 1023 | } |
| 1024 | |
| 1025 | .btn-sm { |
| 1026 | padding: 5px 10px; |
| 1027 | font-size: 12.5px; |
| 1028 | } |
| 1029 | |
| 1030 | .icon-btn-sm { |
| 1031 | padding: 4px 6px; |
| 1032 | } |
| 1033 | |
| 1034 | /* "Your shares" manage view */ |
| 1035 | |
| 1036 | .shares-view { |
| 1037 | width: 100%; |
| 1038 | max-width: 960px; |
| 1039 | margin: 0 auto; |
| 1040 | } |
| 1041 | |
| 1042 | .view-header { |
| 1043 | margin-bottom: 16px; |
| 1044 | } |
| 1045 | |
| 1046 | .view-header .admin-section-title { |
| 1047 | margin-bottom: 0; |
| 1048 | } |
| 1049 | |
| 1050 | .view-hint { |
| 1051 | margin: 4px 0 0; |
| 1052 | font-size: 13px; |
| 1053 | max-width: 64ch; |
| 1054 | } |
| 1055 | |
| 1056 | .share-list { |
| 1057 | display: flex; |
| 1058 | flex-direction: column; |
| 1059 | gap: 10px; |
| 1060 | } |
| 1061 | |
| 1062 | .share-item { |
| 1063 | display: flex; |
| 1064 | align-items: center; |
| 1065 | justify-content: space-between; |
| 1066 | gap: 12px; |
| 1067 | padding: 10px 12px; |
| 1068 | border: 1px solid var(--border); |
| 1069 | background: var(--panel); |
| 1070 | } |
| 1071 | |
| 1072 | .share-item-main { |
| 1073 | min-width: 0; |
| 1074 | } |
| 1075 | |
| 1076 | .share-item-name { |
| 1077 | display: flex; |
| 1078 | align-items: center; |
| 1079 | gap: 8px; |
| 1080 | font-weight: 600; |
| 1081 | font-size: 14px; |
| 1082 | overflow: hidden; |
| 1083 | text-overflow: ellipsis; |
| 1084 | white-space: nowrap; |
| 1085 | } |
| 1086 | |
| 1087 | .ic-row { |
| 1088 | width: 18px; |
| 1089 | height: 18px; |
| 1090 | flex: none; |
| 1091 | } |
| 1092 | |
| 1093 | .share-item-meta { |
| 1094 | font-size: 12px; |
| 1095 | margin-top: 2px; |
| 1096 | overflow: hidden; |
| 1097 | text-overflow: ellipsis; |
| 1098 | white-space: nowrap; |
| 1099 | } |
| 1100 | |
| 1101 | .share-item-actions { |
| 1102 | display: flex; |
| 1103 | gap: 6px; |
| 1104 | flex-shrink: 0; |
| 1105 | } |
| 1106 | |
| 1107 | /* Public share page */ |
| 1108 | |
| 1109 | .share-badge { |
| 1110 | display: inline-flex; |
| 1111 | align-items: center; |
| 1112 | gap: 6px; |
| 1113 | font-size: 13px; |
| 1114 | color: var(--muted); |
| 1115 | background: var(--panel); |
| 1116 | border: 1px solid var(--border); |
| 1117 | padding: 4px 10px; |
| 1118 | } |
| 1119 | |
| 1120 | .ic-badge { |
| 1121 | width: 14px; |
| 1122 | height: 14px; |
| 1123 | flex: none; |
| 1124 | } |
| 1125 | |
| 1126 | .share-footer { |
| 1127 | padding: 16px; |
| 1128 | text-align: center; |
| 1129 | font-size: 12px; |
| 1130 | border-top: 1px solid var(--border); |
| 1131 | margin-top: auto; |
| 1132 | } |
| 1133 | |
| 1134 | .share-file-page { |
| 1135 | display: flex; |
| 1136 | flex-direction: column; |
| 1137 | align-items: center; |
| 1138 | gap: 12px; |
| 1139 | padding: 80px 20px; |
| 1140 | text-align: center; |
| 1141 | } |
| 1142 | |
| 1143 | .share-file-glyph { |
| 1144 | width: 64px; |
| 1145 | height: 64px; |
| 1146 | } |
| 1147 | |
| 1148 | .share-file-page h2 { |
| 1149 | margin: 0; |
| 1150 | word-break: break-word; |
| 1151 | } |
| 1152 | |
| 1153 | .share-file-actions .btn-primary { |
| 1154 | width: auto; |
| 1155 | min-width: 140px; |
| 1156 | } |
| 1157 | |
| 1158 | /* ------------------------------------------------------------------ */ |
| 1159 | /* Admin (milestone 7) */ |
| 1160 | /* ------------------------------------------------------------------ */ |
| 1161 | |
| 1162 | .admin-view { |
| 1163 | display: flex; |
| 1164 | flex-direction: column; |
| 1165 | gap: 16px; |
| 1166 | width: 100%; |
| 1167 | max-width: 960px; |
| 1168 | margin: 0 auto; |
| 1169 | } |
| 1170 | |
| 1171 | .admin-section-title { |
| 1172 | margin: 0 0 14px; |
| 1173 | font-size: 15px; |
| 1174 | } |
| 1175 | |
| 1176 | .users-header { |
| 1177 | display: flex; |
| 1178 | align-items: center; |
| 1179 | justify-content: space-between; |
| 1180 | margin-bottom: 4px; |
| 1181 | } |
| 1182 | |
| 1183 | .users-header .admin-section-title { |
| 1184 | margin-bottom: 0; |
| 1185 | } |
| 1186 | |
| 1187 | .users-header .btn-primary { |
| 1188 | width: auto; |
| 1189 | } |
| 1190 | |
| 1191 | .user-list { |
| 1192 | display: flex; |
| 1193 | flex-direction: column; |
| 1194 | gap: 10px; |
| 1195 | } |
| 1196 | |
| 1197 | .user-row { |
| 1198 | display: flex; |
| 1199 | align-items: center; |
| 1200 | justify-content: space-between; |
| 1201 | gap: 12px; |
| 1202 | padding: 12px 14px; |
| 1203 | border: 1px solid var(--border); |
| 1204 | } |
| 1205 | |
| 1206 | .user-row-main { |
| 1207 | min-width: 0; |
| 1208 | } |
| 1209 | |
| 1210 | .user-row-name { |
| 1211 | display: flex; |
| 1212 | align-items: center; |
| 1213 | gap: 6px; |
| 1214 | font-weight: 600; |
| 1215 | font-size: 14px; |
| 1216 | flex-wrap: wrap; |
| 1217 | } |
| 1218 | |
| 1219 | .ic-admin { |
| 1220 | width: 16px; |
| 1221 | height: 16px; |
| 1222 | flex: none; |
| 1223 | } |
| 1224 | |
| 1225 | .user-row-actions { |
| 1226 | display: flex; |
| 1227 | gap: 6px; |
| 1228 | flex-shrink: 0; |
| 1229 | } |
| 1230 | |
| 1231 | .badge-off { |
| 1232 | background: color-mix(in srgb, var(--danger) 15%, var(--panel)); |
| 1233 | border-color: var(--danger); |
| 1234 | color: var(--danger); |
| 1235 | } |
| 1236 | |
| 1237 | .setting-row { |
| 1238 | display: flex; |
| 1239 | align-items: flex-start; |
| 1240 | gap: 10px; |
| 1241 | padding: 14px; |
| 1242 | border: 1px solid var(--border); |
| 1243 | cursor: pointer; |
| 1244 | } |
| 1245 | |
| 1246 | .setting-row input { |
| 1247 | width: auto; |
| 1248 | margin-top: 2px; |
| 1249 | } |
| 1250 | |
| 1251 | .setting-label { |
| 1252 | display: block; |
| 1253 | font-weight: 600; |
| 1254 | font-size: 14px; |
| 1255 | } |
| 1256 | |
| 1257 | .setting-desc { |
| 1258 | display: block; |
| 1259 | font-size: 12px; |
| 1260 | color: var(--muted); |
| 1261 | margin-top: 2px; |
| 1262 | } |
| 1263 | |
| 1264 | /* User create/edit form */ |
| 1265 | |
| 1266 | .user-form { |
| 1267 | width: 520px; |
| 1268 | } |
| 1269 | |
| 1270 | .field-input { |
| 1271 | width: 100%; |
| 1272 | box-sizing: border-box; |
| 1273 | } |
| 1274 | |
| 1275 | .field-hint { |
| 1276 | font-size: 12px; |
| 1277 | margin: -2px 0 8px; |
| 1278 | } |
| 1279 | |
| 1280 | .check-row { |
| 1281 | display: flex; |
| 1282 | align-items: center; |
| 1283 | gap: 8px; |
| 1284 | font-size: 14px; |
| 1285 | margin-bottom: 12px; |
| 1286 | cursor: pointer; |
| 1287 | } |
| 1288 | |
| 1289 | .check-row input { |
| 1290 | width: auto; |
| 1291 | } |
| 1292 | |
| 1293 | .form-error { |
| 1294 | color: var(--danger); |
| 1295 | font-size: 13px; |
| 1296 | margin: 4px 0 8px; |
| 1297 | } |
| 1298 | |
| 1299 | .roots-editor { |
| 1300 | display: flex; |
| 1301 | flex-direction: column; |
| 1302 | gap: 6px; |
| 1303 | } |
| 1304 | |
| 1305 | .root-draft { |
| 1306 | display: flex; |
| 1307 | align-items: center; |
| 1308 | gap: 8px; |
| 1309 | } |
| 1310 | |
| 1311 | .root-draft-path { |
| 1312 | flex: 1; |
| 1313 | font-size: 13px; |
| 1314 | overflow: hidden; |
| 1315 | text-overflow: ellipsis; |
| 1316 | white-space: nowrap; |
| 1317 | } |
| 1318 | |
| 1319 | .root-draft-mode { |
| 1320 | width: auto; |
| 1321 | padding: 6px 8px; |
| 1322 | } |
| 1323 | |
| 1324 | .root-add { |
| 1325 | display: flex; |
| 1326 | gap: 8px; |
| 1327 | margin-top: 4px; |
| 1328 | } |
| 1329 | |
| 1330 | /* ------------------------------------------------------------------ */ |
| 1331 | /* Empty state + keyboard focus (milestone 8) */ |
| 1332 | /* ------------------------------------------------------------------ */ |
| 1333 | |
| 1334 | .empty-state { |
| 1335 | display: flex; |
| 1336 | flex-direction: column; |
| 1337 | align-items: center; |
| 1338 | justify-content: center; |
| 1339 | gap: 8px; |
| 1340 | padding: 64px 20px; |
| 1341 | text-align: center; |
| 1342 | } |
| 1343 | |
| 1344 | .empty-glyph { |
| 1345 | width: 52px; |
| 1346 | height: 52px; |
| 1347 | } |
| 1348 | |
| 1349 | .empty-state h3 { |
| 1350 | margin: 0; |
| 1351 | font-size: 16px; |
| 1352 | } |
| 1353 | |
| 1354 | /* Visible keyboard focus on selectable file/folder entries. */ |
| 1355 | .tile:focus-visible, |
| 1356 | .row:focus-visible { |
| 1357 | outline: 2px solid var(--accent); |
| 1358 | outline-offset: 2px; |
| 1359 | } |
| 1360 |