BlueGit

timfa filemanager

Files

filemanager / public / style.css

style.css

style.css 16.8 KiB Download Raw
1/* =========================================================
2 RESET & CUSTOM PROPERTIES
3 ========================================================= */
4*,
5*::before,
6*::after {
7 box-sizing: border-box;
8 margin: 0;
9 padding: 0;
10}
11
12:root {
13 --bg: #0f1117;
14 --surface: #1a1d27;
15 --surface2: #21242f;
16 --border: #2e3247;
17 --accent: #5b7fff;
18 --accent-hover: #7b9fff;
19 --text: #e8eaf0;
20 --text-muted: #7880a0;
21 --danger: #e05c6e;
22 --success: #3fcf8e;
23 --radius: 10px;
24 --topbar-h: 56px;
25 --sidebar-w: 300px;
26 --transition: 0.18s ease;
27}
28
29html,
30body {
31 height: 100%;
32 font-family: system-ui, -apple-system, sans-serif;
33}
34
35body {
36 background: var(--bg);
37 color: var(--text);
38 overflow: hidden;
39}
40
41.hidden {
42 display: none !important;
43}
44
45.muted {
46 color: var(--text-muted);
47}
48
49.error {
50 color: var(--danger);
51 font-size: 0.85rem;
52 margin-top: 0.3rem;
53}
54
55/* =========================================================
56 AUTH OVERLAY
57 ========================================================= */
58.overlay {
59 position: fixed;
60 inset: 0;
61 background: var(--bg);
62 display: flex;
63 align-items: center;
64 justify-content: center;
65 z-index: 100;
66}
67
68.auth-card {
69 background: var(--surface);
70 border: 1px solid var(--border);
71 border-radius: var(--radius);
72 padding: 2.5rem 2rem;
73 width: min(420px, 92vw);
74}
75
76.auth-card h1 {
77 font-size: 1.6rem;
78 margin-bottom: 0.5rem;
79}
80
81.auth-subtitle {
82 font-size: 0.88rem;
83 color: var(--text-muted);
84 margin-bottom: 1.2rem;
85}
86
87#auth-form label {
88 display: flex;
89 flex-direction: column;
90 gap: 0.3rem;
91 font-size: 0.85rem;
92 color: var(--text-muted);
93 margin-bottom: 1rem;
94}
95
96#auth-form input {
97 background: var(--bg);
98 border: 1px solid var(--border);
99 border-radius: 6px;
100 padding: 0.55rem 0.75rem;
101 color: var(--text);
102 font-size: 1rem;
103 outline: none;
104 transition: border-color var(--transition);
105}
106
107#auth-form input:focus {
108 border-color: var(--accent);
109}
110
111/* =========================================================
112 BUTTONS
113 ========================================================= */
114button {
115 cursor: pointer;
116 border: none;
117 border-radius: 6px;
118 font-size: 0.9rem;
119 transition: background var(--transition), color var(--transition);
120}
121
122.icon-btn {
123 display: flex;
124 align-items: center;
125 gap: 0.4rem;
126 background: transparent;
127 color: var(--text-muted);
128 padding: 0.4rem 0.7rem;
129 border-radius: 6px;
130}
131
132.icon-btn:hover {
133 background: var(--surface2);
134 color: var(--text);
135}
136
137.icon-btn svg {
138 width: 18px;
139 height: 18px;
140}
141
142button[type="submit"],
143.primary {
144 background: var(--accent);
145 color: #fff;
146 padding: 0.55rem 1.2rem;
147 font-weight: 600;
148 width: 100%;
149 margin-top: 0.5rem;
150}
151
152button[type="submit"]:hover,
153.primary:hover {
154 background: var(--accent-hover);
155}
156
157button.danger {
158 background: var(--surface2);
159 color: var(--danger);
160 padding: 0.55rem 1.2rem;
161 width: 100%;
162 margin-top: 0.5rem;
163}
164
165button.danger:hover {
166 background: var(--border);
167}
168
169/* =========================================================
170 TOP BAR
171 ========================================================= */
172#app {
173 display: flex;
174 flex-direction: column;
175 height: 100vh;
176}
177
178#topbar {
179 height: var(--topbar-h);
180 background: var(--surface);
181 border-bottom: 1px solid var(--border);
182 display: flex;
183 align-items: center;
184 padding: 0 1rem;
185 gap: 0.5rem;
186 flex-shrink: 0;
187}
188
189#breadcrumb-wrap {
190 flex: 1;
191 min-width: 0;
192}
193
194#breadcrumb {
195 display: flex;
196 align-items: center;
197 flex-wrap: wrap;
198 gap: 0.1rem;
199 font-size: 0.9rem;
200 white-space: nowrap;
201 overflow: hidden;
202}
203
204#breadcrumb .crumb {
205 color: var(--text-muted);
206 background: none;
207 padding: 0.2rem 0.35rem;
208 border-radius: 4px;
209 text-decoration: none;
210 cursor: pointer;
211}
212
213#breadcrumb .crumb:hover {
214 color: var(--text);
215 background: var(--surface2);
216}
217
218#breadcrumb .crumb.active {
219 color: var(--text);
220 cursor: default;
221}
222
223#breadcrumb .sep {
224 color: var(--border);
225 user-select: none;
226}
227
228#topbar-actions {
229 display: flex;
230 align-items: center;
231 gap: 0.25rem;
232 flex-shrink: 0;
233}
234
235/* =========================================================
236 MAIN + SIDEBAR LAYOUT
237 ========================================================= */
238#main-content {
239 flex: 1;
240 overflow-y: auto;
241 padding: 1.25rem;
242 position: relative;
243}
244
245#folder-stats {
246 margin-bottom: 0.8rem;
247 font-size: 0.85rem;
248}
249
250/* Drop overlay */
251#drop-overlay {
252 position: absolute;
253 inset: 0;
254 background: rgba(91, 127, 255, 0.12);
255 border: 3px dashed var(--accent);
256 border-radius: var(--radius);
257 display: flex;
258 align-items: center;
259 justify-content: center;
260 z-index: 10;
261 font-size: 1.4rem;
262 color: var(--accent);
263 pointer-events: none;
264}
265
266/* When sidebar is open, shrink main content */
267#app.sidebar-open #main-content {
268 margin-right: var(--sidebar-w);
269}
270
271/* =========================================================
272 FILE GRID
273 ========================================================= */
274#file-grid {
275 display: grid;
276 grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
277 gap: 0.75rem;
278}
279
280.file-item {
281 display: flex;
282 flex-direction: column;
283 align-items: center;
284 padding: 0.9rem 0.5rem 0.7rem;
285 border-radius: var(--radius);
286 border: 1px solid transparent;
287 cursor: pointer;
288 user-select: none;
289 transition: background var(--transition), border-color var(--transition);
290 text-align: center;
291 gap: 0.4rem;
292 position: relative;
293}
294
295.file-item:hover {
296 background: var(--surface);
297 border-color: var(--border);
298}
299
300.file-item.selected {
301 background: var(--surface2);
302 border-color: var(--accent);
303}
304
305.file-item .icon {
306 width: 52px;
307 height: 52px;
308 display: flex;
309 align-items: center;
310 justify-content: center;
311}
312
313.file-item .icon svg {
314 width: 100%;
315 height: 100%;
316}
317
318.file-item .name {
319 font-size: 0.8rem;
320 word-break: break-all;
321 max-width: 100%;
322 line-height: 1.3;
323 color: var(--text);
324}
325
326/* =========================================================
327 SIDEBAR
328 ========================================================= */
329#sidebar {
330 position: fixed;
331 top: var(--topbar-h);
332 right: 0;
333 bottom: 0;
334 width: var(--sidebar-w);
335 background: var(--surface);
336 border-left: 1px solid var(--border);
337 padding: 1.25rem;
338 overflow-y: auto;
339 z-index: 20;
340 display: flex;
341 flex-direction: column;
342 gap: 0.75rem;
343}
344
345#sidebar-close {
346 background: none;
347 color: var(--text-muted);
348 align-self: flex-end;
349 font-size: 1.1rem;
350 padding: 0.2rem 0.5rem;
351}
352
353#sidebar-close:hover {
354 color: var(--text);
355}
356
357#sidebar-icon {
358 display: flex;
359 justify-content: center;
360}
361
362#sidebar-icon svg {
363 width: 64px;
364 height: 64px;
365}
366
367#sidebar-name {
368 font-size: 1rem;
369 word-break: break-all;
370 text-align: center;
371}
372
373#sidebar-meta {
374 display: grid;
375 grid-template-columns: auto 1fr;
376 gap: 0.3rem 0.75rem;
377}
378
379#sidebar-meta dt {
380 color: var(--text-muted);
381 font-size: 0.8rem;
382 font-weight: 600;
383}
384
385#sidebar-meta dd {
386 font-size: 0.8rem;
387 word-break: break-all;
388}
389
390#sidebar-actions {
391 display: flex;
392 flex-direction: column;
393 gap: 0.5rem;
394 margin-top: 0.5rem;
395}
396
397#sidebar-actions button {
398 background: var(--surface2);
399 color: var(--text);
400 padding: 0.5rem 0.8rem;
401 text-align: left;
402}
403
404#sidebar-actions button:hover {
405 background: var(--border);
406}
407
408#sidebar-actions button.danger {
409 color: var(--danger);
410}
411
412/* =========================================================
413 MODALS
414 ========================================================= */
415.modal-overlay {
416 position: fixed;
417 inset: 0;
418 background: rgba(0, 0, 0, 0.65);
419 display: flex;
420 align-items: center;
421 justify-content: center;
422 z-index: 50;
423}
424
425.modal {
426 background: var(--surface);
427 border: 1px solid var(--border);
428 border-radius: var(--radius);
429 padding: 2rem;
430 width: min(560px, 94vw);
431 max-height: 90vh;
432 overflow-y: auto;
433 position: relative;
434}
435
436.modal.small {
437 width: min(340px, 94vw);
438}
439
440.modal h2 {
441 font-size: 1.3rem;
442 margin-bottom: 1.25rem;
443}
444
445.modal h3 {
446 font-size: 1rem;
447 color: var(--text-muted);
448 margin: 1rem 0 0.5rem;
449}
450
451.modal-close {
452 position: absolute;
453 top: 0.75rem;
454 right: 0.75rem;
455 background: none;
456 color: var(--text-muted);
457 font-size: 1.1rem;
458 padding: 0.25rem 0.5rem;
459}
460
461.modal-close:hover {
462 color: var(--text);
463}
464
465/* Admin path list */
466.path-row {
467 display: flex;
468 align-items: center;
469 gap: 0.5rem;
470 padding: 0.4rem 0;
471 border-bottom: 1px solid var(--border);
472 font-size: 0.88rem;
473}
474
475.path-row span {
476 flex: 1;
477 word-break: break-all;
478}
479
480.path-row button {
481 background: none;
482 color: var(--danger);
483 padding: 0.2rem 0.5rem;
484}
485
486.path-add-row {
487 display: flex;
488 gap: 0.5rem;
489 margin: 0.5rem 0;
490}
491
492.path-add-row input {
493 flex: 1;
494 background: var(--bg);
495 border: 1px solid var(--border);
496 border-radius: 6px;
497 padding: 0.45rem 0.7rem;
498 color: var(--text);
499 font-size: 0.9rem;
500 outline: none;
501}
502
503.path-add-row input:focus {
504 border-color: var(--accent);
505}
506
507.path-add-row button {
508 background: var(--surface2);
509 color: var(--text);
510 padding: 0.45rem 0.9rem;
511}
512
513.path-add-row button:hover {
514 background: var(--border);
515}
516
517/* User list */
518.user-row {
519 display: flex;
520 align-items: center;
521 gap: 0.6rem;
522 padding: 0.5rem 0;
523 border-bottom: 1px solid var(--border);
524}
525
526.user-row .user-name {
527 flex: 1;
528 font-weight: 600;
529 font-size: 0.9rem;
530}
531
532.user-row .user-admin-badge {
533 font-size: 0.72rem;
534 background: var(--accent);
535 color: #fff;
536 border-radius: 4px;
537 padding: 0.1rem 0.4rem;
538}
539
540.user-row button {
541 background: none;
542 color: var(--text-muted);
543 padding: 0.2rem 0.5rem;
544 font-size: 0.85rem;
545}
546
547.user-row button:hover {
548 color: var(--text);
549}
550
551.user-row button.danger {
552 color: var(--danger);
553}
554
555/* User form permissions */
556#user-permissions {
557 margin-top: 0.75rem;
558}
559
560#user-permissions h4 {
561 font-size: 0.85rem;
562 color: var(--text-muted);
563 margin-bottom: 0.4rem;
564}
565
566.perm-row {
567 display: flex;
568 align-items: center;
569 gap: 0.75rem;
570 flex-wrap: wrap;
571 font-size: 0.85rem;
572 margin-bottom: 0.4rem;
573}
574
575.perm-row .perm-label {
576 min-width: 130px;
577 color: var(--text);
578}
579
580.checkbox-label {
581 display: flex;
582 align-items: center;
583 gap: 0.5rem;
584 font-size: 0.9rem;
585 margin-bottom: 0.5rem;
586}
587
588.checkbox-label input[type="checkbox"] {
589 width: 16px;
590 height: 16px;
591 accent-color: var(--accent);
592}
593
594/* Form labels in modals */
595.modal form label {
596 display: flex;
597 flex-direction: column;
598 gap: 0.3rem;
599 font-size: 0.85rem;
600 color: var(--text-muted);
601 margin-bottom: 0.9rem;
602}
603
604.modal form input[type="text"],
605.modal form input[type="password"] {
606 background: var(--bg);
607 border: 1px solid var(--border);
608 border-radius: 6px;
609 padding: 0.5rem 0.75rem;
610 color: var(--text);
611 font-size: 0.95rem;
612 outline: none;
613 transition: border-color var(--transition);
614}
615
616.modal form input:focus {
617 border-color: var(--accent);
618}
619
620/* =========================================================
621 FILE PREVIEW OVERLAY
622 ========================================================= */
623.preview-overlay {
624 position: fixed;
625 inset: 0;
626 z-index: 120;
627 background: rgba(8, 9, 14, 0.82);
628 display: flex;
629 align-items: center;
630 justify-content: center;
631 padding: 2rem;
632}
633
634.preview-sheet {
635 position: relative;
636 width: min(94vw, 1100px);
637 height: min(90vh, 860px);
638 border: 2px solid #3fcf8e;
639 border-radius: 12px;
640 background: linear-gradient(180deg, #151925 0%, #111521 100%);
641 box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
642 display: flex;
643 flex-direction: column;
644 overflow: hidden;
645 animation: preview-balloon 220ms cubic-bezier(0.2, 0.9, 0.2, 1.05);
646}
647
648.preview-fold {
649 position: absolute;
650 top: 0;
651 right: 0;
652 width: 64px;
653 height: 64px;
654 background: linear-gradient(135deg, #182135 0%, #0f1525 100%);
655 clip-path: polygon(100% 0, 100% 100%, 0 0);
656 border-left: 1px solid rgba(63, 207, 142, 0.45);
657 border-bottom: 1px solid rgba(63, 207, 142, 0.45);
658}
659
660.preview-close {
661 position: absolute;
662 top: 8px;
663 right: 8px;
664 width: 28px;
665 height: 28px;
666 background: transparent;
667 color: #d6deef;
668 border-radius: 999px;
669 font-size: 0.95rem;
670 z-index: 2;
671}
672
673.preview-close:hover {
674 background: rgba(255, 255, 255, 0.08);
675}
676
677.preview-title {
678 font-size: 1rem;
679 color: var(--text);
680 padding: 0.85rem 1rem;
681 margin: 0;
682 border-bottom: 1px solid var(--border);
683 white-space: nowrap;
684 overflow: hidden;
685 text-overflow: ellipsis;
686 padding-right: 3.5rem;
687}
688
689.preview-body {
690 flex: 1;
691 min-height: 0;
692 overflow: auto;
693 display: flex;
694 align-items: center;
695 justify-content: center;
696 padding: 0.9rem;
697}
698
699.preview-media {
700 max-width: 100%;
701 max-height: 100%;
702 width: auto;
703 height: auto;
704 object-fit: contain;
705}
706
707.preview-frame {
708 width: 100%;
709 height: 100%;
710 border: none;
711 border-radius: 8px;
712 background: #fff;
713}
714
715.preview-audio {
716 width: min(640px, 95%);
717}
718
719.preview-text {
720 width: 100%;
721 min-height: 100%;
722 color: #dce4ff;
723 background: #0d111a;
724 border: 1px solid var(--border);
725 border-radius: 8px;
726 padding: 0.9rem;
727 font: 0.85rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
728 overflow: auto;
729 white-space: pre;
730}
731
732.preview-code .tok-comment {
733 color: #6f7f9a;
734}
735
736.preview-code .tok-string {
737 color: #9ee37d;
738}
739
740.preview-code .tok-number {
741 color: #f8c46a;
742}
743
744.preview-code .tok-keyword {
745 color: #8bb4ff;
746 font-weight: 600;
747}
748
749.preview-code .tok-key {
750 color: #59c8ff;
751}
752
753.preview-unsupported {
754 color: var(--text-muted);
755 font-size: 0.95rem;
756 max-width: 56ch;
757 text-align: center;
758}
759
760.preview-footer {
761 border-top: 1px solid var(--border);
762 padding: 0.8rem 1rem;
763 display: flex;
764 justify-content: flex-end;
765}
766
767.preview-footer .primary {
768 width: auto;
769 margin-top: 0;
770 min-width: 8rem;
771}
772
773@keyframes preview-balloon {
774 from {
775 opacity: 0;
776 transform: scale(0.12);
777 }
778
779 to {
780 opacity: 1;
781 transform: scale(1);
782 }
783}
784
785/* =========================================================
786 TOAST
787 ========================================================= */
788#toast {
789 position: fixed;
790 bottom: 1.5rem;
791 left: 50%;
792 transform: translateX(-50%);
793 z-index: 200;
794 display: flex;
795 flex-direction: column;
796 align-items: center;
797 gap: 0.5rem;
798 pointer-events: none;
799}
800
801.toast-msg {
802 background: var(--surface2);
803 border: 1px solid var(--border);
804 border-radius: 8px;
805 padding: 0.6rem 1.25rem;
806 font-size: 0.9rem;
807 animation: slideup 0.25s ease;
808}
809
810.toast-msg.err {
811 border-color: var(--danger);
812 color: var(--danger);
813}
814
815.toast-msg.ok {
816 border-color: var(--success);
817 color: var(--success);
818}
819
820@keyframes slideup {
821 from {
822 opacity: 0;
823 transform: translateY(12px);
824 }
825
826 to {
827 opacity: 1;
828 transform: translateY(0);
829 }
830}
831
832/* =========================================================
833 UPLOAD PROGRESS
834 ========================================================= */
835.upload-bar-wrap {
836 position: fixed;
837 bottom: 0;
838 left: 0;
839 right: 0;
840 background: var(--surface);
841 border-top: 1px solid var(--border);
842 padding: 0.5rem 1rem;
843 z-index: 80;
844 font-size: 0.85rem;
845}
846
847.upload-bar-track {
848 height: 6px;
849 background: var(--border);
850 border-radius: 3px;
851 margin-top: 0.3rem;
852}
853
854.upload-bar-fill {
855 height: 100%;
856 background: var(--accent);
857 border-radius: 3px;
858 transition: width 0.2s linear;
859}
860
861/* =========================================================
862 RESPONSIVE — narrow screens
863 ========================================================= */
864@media (max-width: 600px) {
865 #topbar {
866 height: auto;
867 min-height: var(--topbar-h);
868 padding: 0.5rem 0.6rem;
869 align-items: flex-start;
870 flex-direction: column;
871 }
872
873 #breadcrumb-wrap {
874 width: 100%;
875 }
876
877 #topbar-actions {
878 width: 100%;
879 flex-wrap: wrap;
880 gap: 0.15rem;
881 }
882
883 .icon-btn {
884 padding: 0.4rem 0.55rem;
885 font-size: 0.82rem;
886 }
887
888 #main-content {
889 padding: 0.9rem;
890 }
891
892 #file-grid {
893 grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
894 }
895
896 #app.sidebar-open #main-content {
897 margin-right: 0;
898 }
899
900 #sidebar {
901 top: auto;
902 left: 0;
903 height: 60vh;
904 border-left: none;
905 border-top: 1px solid var(--border);
906 width: 100%;
907 }
908
909 .modal {
910 padding: 1.25rem;
911 }
912
913 .preview-overlay {
914 padding: 0.8rem;
915 }
916
917 .preview-sheet {
918 width: 100%;
919 height: 92vh;
920 }
921
922 .preview-fold {
923 width: 54px;
924 height: 54px;
925 }
926
927 .preview-close {
928 top: 5px;
929 right: 5px;
930 }
931}
932
933/* =========================================================
934 DIALOG MODALS (confirm / prompt / overwrite)
935 ========================================================= */
936.dialog-message {
937 color: var(--text-muted);
938 font-size: 0.93rem;
939 margin: 0 0 1.5rem;
940 line-height: 1.5;
941 word-break: break-word;
942}
943
944.dialog-actions {
945 display: flex;
946 gap: 0.6rem;
947 justify-content: flex-end;
948 flex-wrap: wrap;
949}
950
951.dialog-actions--overwrite {
952 justify-content: space-between;
953}
954
955.dialog-actions button {
956 min-width: 5rem;
957 background: var(--surface2);
958 color: var(--text);
959 padding: 0.5rem 1rem;
960}
961
962.dialog-actions button:hover {
963 background: var(--border);
964}
965
966/* Override .primary full-width inside dialog rows */
967.dialog-actions button.primary {
968 width: auto;
969 margin-top: 0;
970}