* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
}

/* Hide content during initial load to prevent flash */
body.loading #app {
    visibility: hidden;
}

.hidden {
    display: none !important;
}

.page {
    min-height: 100vh;
}

#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    margin-bottom: 30px;
    text-align: center;
    color: #667eea;
}

#login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#login-form button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

#login-form button:hover {
    background: #5568d3;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

#file-manager {
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
}

header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#logout-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#logout-btn:hover {
    background: #c0392b;
}

.toolbar {
    background: white;
    padding: 15px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.toolbar button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.toolbar button:hover {
    background: #5568d3;
}


.drop-zone {
    margin: 20px 30px;
    padding: 40px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    text-align: center;
    background: white;
    transition: all 0.3s;
}

.drop-zone.drag-over {
    border-color: #667eea;
    background: #f0f0ff;
}

.drop-zone p {
    color: #999;
    font-size: 16px;
}

#upload-progress {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #667eea;
    transition: width 0.3s;
    width: 0%;
}

.content {
    padding: 20px 30px;
}

.folder-list, .file-list {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.folder-list h3, .file-list h3 {
    margin-bottom: 15px;
    color: #333;
}

.folder-item, .file-item {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.folder-item:hover, .file-item:hover {
    background: #f9f9f9;
    border-color: #667eea;
}

.folder-item.locked:before {
    content: '🔒 ';
}

.item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.item-name {
    font-weight: 500;
}

.item-meta {
    color: #999;
    font-size: 14px;
}

.item-actions {
    display: flex;
    gap: 10px;
}

.item-actions button {
    padding: 5px 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.item-actions button:hover {
    background: #5568d3;
}

.item-actions button.delete {
    background: #e74c3c;
}

.item-actions button.delete:hover {
    background: #c0392b;
}

.item-actions button.edit {
    background: #27ae60;
}

.item-actions button.edit:hover {
    background: #229954;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    min-width: 400px;
}

.modal-content {
    padding: 30px;
}

.modal-content.large {
    min-width: 800px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.modal h2 {
    margin-bottom: 20px;
    color: #333;
}

.modal input[type="text"],
.modal input[type="password"],
.modal input[type="number"],
.modal select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-buttons button:first-child {
    background: #667eea;
    color: white;
}

.modal-buttons button:first-child:hover {
    background: #5568d3;
}

.modal-buttons button:last-child {
    background: #e0e0e0;
    color: #333;
}

.modal-buttons button:last-child:hover {
    background: #ccc;
}

#share-link-result {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

#share-link-url {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

#copy-share-link {
    width: 100%;
    padding: 10px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#copy-share-link:hover {
    background: #229954;
}

#preview-container {
    min-height: 400px;
    max-height: 70vh;
    overflow: auto;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

#preview-container iframe,
#preview-container canvas {
    width: 100%;
    min-height: 600px;
    border: none;
}

/* PDF Viewer with text layer */
.pdf-viewer {
    position: relative;
    margin: 0 auto;
    overflow: hidden;
}

.pdf-viewer canvas {
    display: block;
}

.pdf-text-layer {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    opacity: 0.2;
    line-height: 1.0;
}

.pdf-text-layer > span {
    color: transparent;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
}

.pdf-text-layer ::selection {
    background: #3297fd;
}

.pdf-text-layer ::-moz-selection {
    background: #3297fd;
}

.pdf-controls {
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 10px;
}

.pdf-controls button {
    padding: 8px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.pdf-controls button:hover:not(:disabled) {
    background: #5568d3;
}

.pdf-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#pdf-copy-btn {
    background: #27ae60;
}

#pdf-copy-btn:hover {
    background: #229954;
}

/* Text Editor */
#text-editor-modal .modal-content {
    max-width: 900px;
    height: 80vh;
    display: flex;
    flex-direction: column;
}

#text-editor-filename {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#text-editor-content {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    margin-bottom: 15px;
}

#text-editor-content:focus {
    outline: none;
    border-color: #667eea;
}

.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    min-width: 150px;
}

.menu-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:hover {
    background: #f0f0f0;
}

.menu-item:first-child {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.menu-item:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 250px;
}

.search-box button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #5568d3;
}

#clear-search-btn {
    background: #95a5a6;
}

#clear-search-btn:hover {
    background: #7f8c8d;
}

/* Search Results */
.search-results {
    background: white;
    margin: 20px 30px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-results h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.search-section {
    margin-bottom: 20px;
}

.search-section h4 {
    margin-bottom: 10px;
    color: #555;
    font-size: 16px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
}

.search-result-item:hover {
    background: #e8e8e8;
}

.result-icon {
    font-size: 20px;
}

.result-name {
    font-weight: 500;
    flex: 1;
}

.result-path {
    color: #888;
    font-size: 13px;
}

.result-size {
    color: #888;
    font-size: 13px;
}

.download-btn {
    padding: 6px 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.download-btn:hover {
    background: #229954;
}

/* Breadcrumb Enhancements */
.breadcrumb {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: #667eea;
    cursor: pointer;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.breadcrumb-item:hover {
    background: #f0f0f0;
}

.breadcrumb-separator {
    color: #999;
    margin: 0 5px;
}

/* Dark Theme */
body.dark-theme {
    background: #1a1a1a !important;
    color: #e0e0e0;
}

body.dark-theme .page {
    background: #1a1a1a;
}

body.dark-theme #file-manager {
    background: #1a1a1a !important;
}

body.dark-theme .content {
    background: #1a1a1a;
}

body.dark-theme #login-page {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

body.dark-theme .login-container,
body.dark-theme header,
body.dark-theme .toolbar,
body.dark-theme .breadcrumb,
body.dark-theme .drop-zone,
body.dark-theme .folder-list,
body.dark-theme .file-list,
body.dark-theme .search-results,
body.dark-theme .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-theme header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

body.dark-theme .toolbar,
body.dark-theme .breadcrumb {
    border-bottom-color: #404040;
}

body.dark-theme .folder-item,
body.dark-theme .file-item,
body.dark-theme .search-result-item {
    background: #2d2d2d;
    border-color: #404040;
}

body.dark-theme .folder-item:hover,
body.dark-theme .file-item:hover,
body.dark-theme .search-result-item:hover {
    background: #3a3a3a;
    border-color: #667eea;
}

body.dark-theme .drop-zone {
    border-color: #555;
}

body.dark-theme .drop-zone.drag-over {
    border-color: #667eea;
    background: #3a3a50;
}

body.dark-theme .drop-zone p {
    color: #aaa;
}

body.dark-theme #login-form input,
body.dark-theme .search-box input,
body.dark-theme .modal input[type="text"],
body.dark-theme .modal input[type="password"],
body.dark-theme .modal input[type="number"],
body.dark-theme .modal select {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme #login-form input::placeholder,
body.dark-theme .search-box input::placeholder {
    color: #888;
}

body.dark-theme .item-meta,
body.dark-theme .result-path,
body.dark-theme .result-size {
    color: #aaa;
}

body.dark-theme .breadcrumb-item {
    color: #8b9cff;
}

body.dark-theme .breadcrumb-separator {
    color: #666;
}

body.dark-theme .modal-overlay {
    background: rgba(0,0,0,0.7);
}

body.dark-theme .context-menu {
    background: #2d2d2d;
    border-color: #404040;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

body.dark-theme .menu-item:hover {
    background: #3a3a3a;
}

body.dark-theme #share-link-result {
    background: #3a3a3a;
}

body.dark-theme #share-link-url {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme #preview-container {
    background: #3a3a3a;
}

body.dark-theme .pdf-controls {
    background: #2d2d2d;
}

body.dark-theme .pdf-viewer {
    background: #2d2d2d;
}

body.dark-theme #text-editor-filename,
body.dark-theme #text-editor-content {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme #text-editor-content:focus {
    border-color: #667eea;
}

body.dark-theme .progress-bar {
    background: #3a3a3a;
}

body.dark-theme .folder-list h3,
body.dark-theme .file-list h3,
body.dark-theme .search-results h3,
body.dark-theme .search-section h4,
body.dark-theme .modal h2 {
    color: #e0e0e0;
}

/* Theme Toggle Button */
#theme-toggle {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

#theme-toggle:hover {
    background: #5568d3;
}

body.dark-theme #theme-toggle {
    background: #8b9cff;
}

body.dark-theme #theme-toggle:hover {
    background: #a0afff;
}

/* File info modal */
.file-info-details {
    margin: 20px 0;
}

.file-info-details p {
    margin: 10px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
}

body.dark-theme .file-info-details p {
    background: #2a2a3a;
}

.file-info-details strong {
    display: inline-block;
    min-width: 100px;
    color: #667eea;
}

body.dark-theme .file-info-details strong {
    color: #8b9cff;
}

/* PDF controls */
.pdf-controls {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 15px;
}

body.dark-theme .pdf-controls {
    background: #2a2a3a;
}

.pdf-controls button {
    padding: 8px 16px;
    margin: 0 5px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.pdf-controls button:hover:not(:disabled) {
    background: #5568d3;
}

.pdf-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

body.dark-theme .pdf-controls button {
    background: #8b9cff;
}

body.dark-theme .pdf-controls button:hover:not(:disabled) {
    background: #a0afff;
}

body.dark-theme .pdf-controls button:disabled {
    background: #4a4a5a;
}

/* Selection toolbar */
.selection-toolbar {
    background: #667eea;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.selection-toolbar span {
    font-weight: 600;
    flex: 1;
}

.selection-toolbar button {
    padding: 8px 16px;
    background: white;
    color: #667eea;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.selection-toolbar button:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

body.dark-theme .selection-toolbar {
    background: #8b9cff;
}

body.dark-theme .selection-toolbar button {
    background: #1a1a2e;
    color: #8b9cff;
}

body.dark-theme .selection-toolbar button:hover {
    background: #252540;
}

/* File checkboxes */
.file-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 10px;
    flex-shrink: 0;
}

.file-item {
    display: flex;
    align-items: center;
}

/* Search autocomplete */
.search-box {
    position: relative;
}

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

body.dark-theme .search-autocomplete {
    background: #2a2a3a;
    border-color: #4a4a5a;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

body.dark-theme .autocomplete-item {
    border-bottom-color: #3a3a4a;
}

body.dark-theme .autocomplete-item:hover {
    background: #3a3a4a;
}

.autocomplete-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.autocomplete-text {
    flex: 1;
    min-width: 0;
}

.autocomplete-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-path {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-theme .autocomplete-name {
    color: #e0e0e0;
}

body.dark-theme .autocomplete-path {
    color: #999;
}

/* Danger button */
.danger-btn {
    background: #e74c3c !important;
    color: white !important;
}

.danger-btn:hover {
    background: #c0392b !important;
}

/* Drag and drop styles */
.file-item.dragging {
    opacity: 0.5;
    cursor: move;
}

.folder-item.drag-over {
    background: #e8f0fe;
    border-color: #667eea;
    border-width: 2px;
    transform: scale(1.02);
}

body.dark-theme .folder-item.drag-over {
    background: #3a4a6a;
    border-color: #8b9cff;
}

.breadcrumb-item.drag-over {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

body.dark-theme .breadcrumb-item.drag-over {
    background: #8b9cff;
    color: white;
}

/* UP folder button */
.folder-item.up-folder {
    background: #f0f4ff;
    border-color: #667eea;
    font-weight: 600;
}

.folder-item.up-folder:hover {
    background: #e8f0fe;
    border-color: #5568d3;
}

body.dark-theme .folder-item.up-folder {
    background: #2a3a5a;
    border-color: #8b9cff;
}

body.dark-theme .folder-item.up-folder:hover {
    background: #3a4a6a;
    border-color: #a0afff;
}

/* Upload controls for chunked upload */
.upload-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.upload-control-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.upload-control-btn:not(.danger) {
    background: #667eea;
    color: white;
}

.upload-control-btn:not(.danger):hover {
    background: #5568d3;
}

.upload-control-btn.danger {
    background: #e74c3c;
    color: white;
}

.upload-control-btn.danger:hover {
    background: #c0392b;
}

/* Upload stats display */
#upload-stats {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

body.dark-theme #upload-stats {
    background: #2a2a2a;
    color: #aaa;
}

body.dark-theme .upload-controls {
    border-top-color: #404040;
}

body.dark-theme .upload-control-btn:not(.danger) {
    background: #8b9cff;
}

body.dark-theme .upload-control-btn:not(.danger):hover {
    background: #a0afff;
}

/* ============================================
   Guest Access Styles
   ============================================ */

/* Guest access divider */
.guest-access-divider {
    display: flex;
    align-items: center;
    margin: 25px 0 15px;
    color: #999;
    font-size: 14px;
}

.guest-access-divider::before,
.guest-access-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.guest-access-divider span {
    padding: 0 15px;
}

body.dark-theme .guest-access-divider {
    color: #666;
}

body.dark-theme .guest-access-divider::before,
body.dark-theme .guest-access-divider::after {
    background: #444;
}

/* Guest access button */
.guest-access-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.guest-access-btn:hover {
    background: #667eea;
    color: white;
}

body.dark-theme .guest-access-btn {
    color: #8b9cff;
    border-color: #8b9cff;
}

body.dark-theme .guest-access-btn:hover {
    background: #8b9cff;
    color: #1a1a2e;
}

/* Guest request form */
#guest-request-container {
    margin-top: 20px;
}

#guest-request-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#guest-request-form button {
    width: 48%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

#guest-request-form button[type="submit"] {
    background: #667eea;
    color: white;
    margin-right: 4%;
}

#guest-request-form button[type="submit"]:hover {
    background: #5568d3;
}

#guest-request-form button[type="button"] {
    background: #ddd;
    color: #333;
}

#guest-request-form button[type="button"]:hover {
    background: #ccc;
}

body.dark-theme #guest-request-form input {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-theme #guest-request-form button[type="button"] {
    background: #4a4a4a;
    color: #e0e0e0;
}

/* Guest waiting screen */
#guest-waiting-container {
    text-align: center;
    padding: 30px 0;
}

.waiting-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #ddd;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#guest-waiting-container p {
    margin: 10px 0;
    color: #666;
}

.guest-name-display {
    font-size: 14px;
    color: #999;
}

.cancel-btn {
    margin-top: 20px;
    padding: 10px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: #c0392b;
}

body.dark-theme .waiting-spinner {
    border-color: #444;
    border-top-color: #8b9cff;
}

body.dark-theme #guest-waiting-container p {
    color: #aaa;
}

body.dark-theme .guest-name-display {
    color: #777;
}

/* Guest requests button in header */
.guest-requests-btn {
    position: relative;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.guest-requests-btn:hover {
    background: #218838;
}

.guest-requests-btn .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .guest-requests-btn {
    background: #3cb371;
}

body.dark-theme .guest-requests-btn:hover {
    background: #2e8b57;
}

/* Guest expiry info */
.guest-expiry-info {
    padding: 5px 12px;
    background: #fff3cd;
    color: #856404;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
}

body.dark-theme .guest-expiry-info {
    background: #5a4a1a;
    color: #ffc107;
}

/* Guest management tabs */
.guest-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.guest-tab {
    padding: 10px 20px;
    background: #f0f0f0;
    border: none;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.guest-tab:hover {
    background: #e0e0e0;
}

.guest-tab.active {
    background: #667eea;
    color: white;
}

.guest-tab span {
    font-size: 12px;
    opacity: 0.8;
}

.guest-tab-content {
    min-height: 200px;
}

body.dark-theme .guest-tabs {
    border-bottom-color: #444;
}

body.dark-theme .guest-tab {
    background: #3a3a3a;
    color: #aaa;
}

body.dark-theme .guest-tab:hover {
    background: #444;
}

body.dark-theme .guest-tab.active {
    background: #667eea;
    color: white;
}

/* Guest requests list in modal */
.guest-requests-list,
.guest-sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.guest-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

.guest-request-item:last-child {
    margin-bottom: 0;
}

.guest-request-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.guest-request-info strong {
    color: #333;
    font-size: 16px;
}

.guest-request-time {
    color: #666;
    font-size: 13px;
}

.guest-request-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guest-request-actions select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.guest-request-actions .approve-btn {
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.guest-request-actions .approve-btn:hover {
    background: #218838;
}

.guest-request-actions .reject-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.guest-request-actions .reject-btn:hover {
    background: #c0392b;
}

body.dark-theme .guest-request-item {
    background: #2a2a3a;
    border-color: #4a4a5a;
}

body.dark-theme .guest-request-info strong {
    color: #e0e0e0;
}

body.dark-theme .guest-request-time {
    color: #999;
}

body.dark-theme .guest-request-actions select {
    background: #3a3a4a;
    border-color: #5a5a6a;
    color: #e0e0e0;
}

body.dark-theme .duration-select {
    background: #3a3a4a;
    border-color: #5a5a6a;
    color: #e0e0e0;
}

/* Guest session items */
.guest-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f0fff0;
}

.guest-session-item:last-child {
    margin-bottom: 0;
}

.guest-session-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.guest-session-info strong {
    color: #333;
    font-size: 16px;
}

.guest-session-meta {
    color: #666;
    font-size: 13px;
}

.guest-session-expiry {
    color: #e67e22;
    font-size: 13px;
    font-weight: 500;
}

.revoke-btn {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.revoke-btn:hover {
    background: #c0392b;
}

body.dark-theme .guest-session-item {
    background: #1a2a2a;
    border-color: #3a4a4a;
}

body.dark-theme .guest-session-info strong {
    color: #e0e0e0;
}

body.dark-theme .guest-session-meta {
    color: #999;
}

body.dark-theme .guest-session-expiry {
    color: #f39c12;
}

/* Admin Panel Styles */
.admin-panel-btn {
    padding: 8px 16px;
    background: #9b59b6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.admin-panel-btn:hover {
    background: #8e44ad;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

#create-user-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#create-user-form input {
    flex: 1;
    min-width: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#create-user-form button {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

#create-user-form button:hover {
    background: #219a52;
}

#create-user-error {
    width: 100%;
    margin-top: 10px;
}

.users-list {
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fafafa;
}

.user-item:last-child {
    margin-bottom: 0;
}

.user-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.user-item-info strong {
    color: #333;
    font-size: 15px;
}

.user-meta {
    color: #666;
    font-size: 12px;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.change-password-btn {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.change-password-btn:hover {
    background: #2980b9;
}

.delete-user-btn {
    padding: 6px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.3s;
}

.delete-user-btn:hover {
    background: #c0392b;
}

/* Private folder indicator */
.folder-item.private-folder {
    border-left: 3px solid #9b59b6;
}

.private-badge {
    font-size: 11px;
    color: #9b59b6;
    margin-left: 8px;
}

/* Dark theme for admin panel */
body.dark-theme .admin-section h3 {
    color: #e0e0e0;
    border-color: #4a4a5a;
}

body.dark-theme #create-user-form input {
    background: #3a3a4a;
    border-color: #5a5a6a;
    color: #e0e0e0;
}

body.dark-theme .user-item {
    background: #2a2a3a;
    border-color: #4a4a5a;
}

body.dark-theme .user-item-info strong {
    color: #e0e0e0;
}

body.dark-theme .user-meta {
    color: #999;
}
