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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #111827;
}

/* Auth pages */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.18), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 30%),
        #f5f7fb;
}

.auth-container {
    width: 100%;
    max-width: 430px;
}

.auth-card {
    background: #ffffff;
    padding: 34px;
    border-radius: 24px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    border: 1px solid #e5e7eb;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4f46e5;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 14px;
    margin-bottom: 22px;
}

.auth-card h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

.form-group input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.auth-link {
    margin-top: 22px;
    color: #6b7280;
    text-align: center;
}

.auth-link a {
    color: #4f46e5;
    font-weight: 700;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */

.alert {
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: #4f46e5;
    color: #ffffff;
}

.btn-primary:hover {
    background: #4338ca;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #eef2ff;
    color: #4f46e5;
}

.btn-secondary:hover {
    background: #e0e7ff;
}

.btn-outline {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
}

.btn-full {
    width: 100%;
}

/* Dashboard */

.dashboard-page {
    min-height: 100vh;
    background: #f5f7fb;
}

.topbar {
    height: 76px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    color: #111827;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-info strong {
    font-size: 14px;
}

.user-info span {
    font-size: 12px;
    color: #6b7280;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px;
    padding: 24px;
}

.sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 16px;
    max-height: calc(100vh - 124px);
    height: fit-content;
    position: sticky;
    top: 100px;
    overflow-y: auto;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

.sidebar .btn {
    margin-bottom: 10px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    margin-top: 14px;
    gap: 14px;
}

.sidebar-nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-label {
    color: #9ca3af;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 10px;
    margin-bottom: 2px;
}

.sidebar-nav a {
    padding: 10px 11px;
    border-radius: 12px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.2;
}

.sidebar-nav a span {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #eef2ff;
    color: #4f46e5;
}

.content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 26px;
    min-height: calc(100vh - 124px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.content-header h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.content-header p {
    color: #6b7280;
}

.empty-state {
    border: 2px dashed #d1d5db;
    border-radius: 22px;
    padding: 70px 24px;
    text-align: center;
    background: #f9fafb;
}

.empty-icon {
    font-size: 54px;
    margin-bottom: 14px;
}

.empty-state h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 24px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Responsive */

@media (max-width: 850px) {
    .topbar {
        height: auto;
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .user-info {
        text-align: left;
    }

    .dashboard-layout {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .sidebar {
        height: auto;
        position: static;
    }

    .content {
        min-height: auto;
    }

    .empty-actions {
        flex-direction: column;
    }

    .auth-card {
        padding: 26px;
    }
}

/* Folder grid */

.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.folder-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 18px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.folder-card:hover {
    transform: translateY(-3px);
    border-color: #c7d2fe;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.folder-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.folder-icon {
    width: 54px;
    height: 54px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.folder-menu {
    position: relative;
}

.folder-menu-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s ease;
}

.folder-menu-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.folder-info h2 {
    font-size: 17px;
    margin-bottom: 6px;
    color: #111827;
    word-break: break-word;
}

.folder-info p {
    font-size: 14px;
    color: #6b7280;
}

.folder-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #9ca3af;
}

/* Modal */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal-overlay.show {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.25);
    animation: modalPop 0.2s ease;
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.modal-header h2 {
    font-size: 22px;
    margin-bottom: 6px;
}

.modal-header p {
    color: #6b7280;
    font-size: 14px;
}

.modal-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 12px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Disabled buttons */

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
}

/* Mobile folders */

@media (max-width: 600px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .content-header .btn {
        width: 100%;
    }

    .folder-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        padding: 22px;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .btn {
        width: 100%;
    }
}

/* Upload and file layout */

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

.folder-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.folder-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.folder-section-header {
    padding: 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.folder-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.folder-title h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.folder-title p {
    color: #6b7280;
    font-size: 14px;
}

.folder-icon.small {
    width: 46px;
    height: 46px;
    font-size: 23px;
}

.btn-sm {
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 10px;
}

.file-table {
    display: flex;
    flex-direction: column;
}

.file-row {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.file-row:last-child {
    border-bottom: none;
}

.file-row:hover {
    background: #f9fafb;
}

.file-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    min-width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    padding: 0 6px;
}

.file-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-info strong {
    font-size: 14px;
    color: #111827;
    word-break: break-word;
}

.file-info span {
    font-size: 12px;
    color: #6b7280;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.folder-empty {
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.form-group select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #d1d5db;
    font-size: 15px;
    outline: none;
    background: #ffffff;
    transition: 0.2s ease;
}

.form-group select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.input-help {
    display: block;
    margin-top: 7px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

@media (max-width: 700px) {
    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
    }

    .folder-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .folder-section-header .btn {
        width: 100%;
    }

    .file-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-actions {
        width: 100%;
    }

    .file-actions .btn {
        width: 100%;
    }
}

/* Delete buttons and folder actions */

.btn-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
    color: #7f1d1d;
    transform: translateY(-1px);
}

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

.folder-actions form,
.file-actions form {
    margin: 0;
}

@media (max-width: 700px) {
    .folder-actions {
        width: 100%;
        flex-direction: column;
    }

    .folder-actions .btn,
    .folder-actions form {
        width: 100%;
    }

    .folder-actions form button {
        width: 100%;
    }
}

/* Drag and drop */

.drag-help-box {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.drag-help-box strong {
    display: block;
    margin-bottom: 5px;
    color: #111827;
    font-size: 14px;
}

.drag-help-box p {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

.file-drag-handle {
    width: 22px;
    min-width: 22px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: grab;
    font-size: 16px;
    user-select: none;
}

.file-drag-handle:active {
    cursor: grabbing;
}

.draggable-file {
    cursor: default;
}

.file-chosen {
    background: #eef2ff !important;
}

.file-ghost {
    opacity: 0.45;
    background: #e0e7ff !important;
}

.file-dragging {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.is-dragging-file .sortable-file-list {
    min-height: 78px;
    outline: 2px dashed #c7d2fe;
    outline-offset: -8px;
    background: #f8faff;
}

.sortable-file-list {
    min-height: 58px;
    transition: 0.2s ease;
}

.sortable-file-list.is-empty {
    min-height: 76px;
}

.drop-empty-message {
    display: none;
}

.sortable-file-list.is-empty .drop-empty-message {
    display: block;
}

.sortable-file-list:not(.is-empty) .drop-empty-message {
    display: none;
}

/* Toast */

.toast {
    display: none;
    margin-bottom: 16px;
    padding: 13px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

.toast.show {
    display: block;
}

.toast.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.toast.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@media (max-width: 700px) {
    .file-main {
        width: 100%;
    }

    .file-drag-handle {
        height: 46px;
    }

    .drag-help-box {
        display: none;
    }
}

/* Rename adjustments */

.file-actions {
    flex-wrap: wrap;
}

.folder-actions {
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .file-actions {
        width: 100%;
        flex-direction: column;
    }

    .file-actions .btn,
    .file-actions form,
    .file-actions form button {
        width: 100%;
    }
}

/* Search */

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 12px;
    border-radius: 18px;
}

.search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    padding: 0 14px;
    transition: 0.2s ease;
}

.search-input-wrap:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.search-icon {
    color: #6b7280;
    font-size: 16px;
}

.search-input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    padding: 13px 0;
    font-size: 15px;
    background: transparent;
    color: #111827;
}

.search-input-wrap input::placeholder {
    color: #9ca3af;
}

.search-result-info {
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.search-hidden {
    display: none !important;
}

.no-search-results {
    display: none;
    border: 2px dashed #d1d5db;
    border-radius: 22px;
    padding: 54px 24px;
    text-align: center;
    background: #f9fafb;
    margin-top: 18px;
}

.no-search-results.show {
    display: block;
}

.no-search-results h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.no-search-results p {
    color: #6b7280;
    margin-bottom: 22px;
}

@media (max-width: 700px) {
    .search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box .btn {
        width: 100%;
    }
}

/* File preview */

.preview-overlay {
    padding: 18px;
}

.preview-card {
    width: 100%;
    max-width: 1100px;
    height: 88vh;
    display: flex;
    flex-direction: column;
}

.preview-header {
    margin-bottom: 14px;
}

.preview-header h2 {
    word-break: break-word;
}

.preview-body {
    flex: 1;
    min-height: 0;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.preview-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.preview-text-frame {
    background: #ffffff;
}

.preview-actions {
    margin-top: 16px;
}

.preview-unavailable {
    text-align: center;
    padding: 30px;
}

.preview-unavailable h3 {
    margin-bottom: 8px;
    font-size: 20px;
}

.preview-unavailable p {
    color: #6b7280;
}

@media (max-width: 700px) {
    .preview-card {
        height: 92vh;
        padding: 18px;
    }

    .preview-actions {
        flex-direction: column-reverse;
    }

    .preview-actions .btn {
        width: 100%;
    }
}

/* Storage stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 13px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card strong {
    font-size: 20px;
    color: #111827;
}

.storage-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.storage-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.storage-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.storage-header p {
    color: #6b7280;
    font-size: 14px;
}

.storage-header strong {
    background: #eef2ff;
    color: #4f46e5;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 14px;
}

.storage-progress {
    width: 100%;
    height: 13px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.storage-progress-bar {
    height: 100%;
    background: #4f46e5;
    border-radius: 999px;
    transition: width 0.25s ease;
}

.storage-warning {
    margin-top: 13px;
    padding: 12px 13px;
    border-radius: 13px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .storage-header {
        flex-direction: column;
    }

    .storage-header strong {
        width: 100%;
        text-align: center;
    }
}

/* Trash */

.sidebar a.btn {
    margin-bottom: 12px;
}

.file-actions form {
    margin: 0;
}

@media (max-width: 700px) {
    .file-actions form,
    .file-actions form button {
        width: 100%;
    }
}

/* Empty trash */

.content-header form,
.folder-section-header form {
    margin: 0;
}

.trash-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.trash-summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.trash-summary-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.trash-summary-card strong {
    font-size: 22px;
    color: #111827;
}

@media (max-width: 700px) {
    .trash-summary {
        grid-template-columns: 1fr;
    }

    .content-header form,
    .content-header form button,
    .folder-section-header form,
    .folder-section-header form button {
        width: 100%;
    }
}

/* Better file type icons */

.file-icon {
    position: relative;
    overflow: hidden;
}

.file-icon::after {
    content: "";
    position: absolute;
    right: -10px;
    bottom: -10px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.file-type-pdf {
    background: #fee2e2;
    color: #991b1b;
}

.file-type-image {
    background: #dcfce7;
    color: #166534;
}

.file-type-word {
    background: #dbeafe;
    color: #1d4ed8;
}

.file-type-excel {
    background: #d1fae5;
    color: #047857;
}

.file-type-powerpoint {
    background: #ffedd5;
    color: #c2410c;
}

.file-type-archive {
    background: #fef3c7;
    color: #92400e;
}

.file-type-text {
    background: #e0e7ff;
    color: #4338ca;
}

.file-type-default {
    background: #f3f4f6;
    color: #374151;
}

.file-info span {
    line-height: 1.5;
}

/* Sorting */

.sort-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 14px;
    border-radius: 18px;
}

.sort-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sort-group label {
    font-size: 13px;
    font-weight: 800;
    color: #374151;
}

.sort-group select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 13px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.sort-group select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

@media (max-width: 700px) {
    .sort-box {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */

.theme-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s ease;
}

.theme-toggle:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

body.dark-mode {
    background: #0f172a;
    color: #f9fafb;
}

body.dark-mode.auth-page {
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.22), transparent 30%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.16), transparent 30%),
        #0f172a;
}

body.dark-mode.dashboard-page {
    background: #0f172a;
}

/* Cards and layout */

body.dark-mode .auth-card,
body.dark-mode .topbar,
body.dark-mode .sidebar,
body.dark-mode .content,
body.dark-mode .folder-section,
body.dark-mode .stat-card,
body.dark-mode .storage-card,
body.dark-mode .trash-summary-card,
body.dark-mode .modal-card {
    background: #111827;
    border-color: #1f2937;
    color: #f9fafb;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

body.dark-mode .topbar {
    border-bottom-color: #1f2937;
}

body.dark-mode .brand,
body.dark-mode .auth-card h1,
body.dark-mode .content-header h1,
body.dark-mode .folder-title h2,
body.dark-mode .folder-info h2,
body.dark-mode .file-info strong,
body.dark-mode .stat-card strong,
body.dark-mode .storage-header h2,
body.dark-mode .trash-summary-card strong,
body.dark-mode .modal-header h2,
body.dark-mode .empty-state h2,
body.dark-mode .no-search-results h2 {
    color: #f9fafb;
}

body.dark-mode .auth-subtitle,
body.dark-mode .content-header p,
body.dark-mode .folder-title p,
body.dark-mode .folder-info p,
body.dark-mode .file-info span,
body.dark-mode .user-info span,
body.dark-mode .storage-header p,
body.dark-mode .trash-summary-card span,
body.dark-mode .modal-header p,
body.dark-mode .empty-state p,
body.dark-mode .no-search-results p,
body.dark-mode .input-help,
body.dark-mode .search-result-info,
body.dark-mode .folder-empty {
    color: #9ca3af;
}

/* Forms */

body.dark-mode .form-group label,
body.dark-mode .sort-group label {
    color: #d1d5db;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .search-input-wrap,
body.dark-mode .search-input-wrap input,
body.dark-mode .sort-group select {
    background: #0f172a;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .search-input-wrap input::placeholder {
    color: #6b7280;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .search-input-wrap:focus-within,
body.dark-mode .sort-group select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

/* Buttons */

body.dark-mode .btn-outline,
body.dark-mode .theme-toggle {
    background: #111827;
    color: #f9fafb;
    border-color: #374151;
}

body.dark-mode .btn-outline:hover,
body.dark-mode .theme-toggle:hover {
    background: #1f2937;
}

body.dark-mode .btn-secondary {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .btn-secondary:hover {
    background: #312e81;
}

body.dark-mode .btn-danger {
    background: #450a0a;
    color: #fecaca;
    border-color: #7f1d1d;
}

body.dark-mode .btn-danger:hover {
    background: #7f1d1d;
    color: #fee2e2;
}

/* Sidebar */

body.dark-mode .sidebar::-webkit-scrollbar-thumb {
    background: #374151;
}

body.dark-mode .sidebar-nav-label {
    color: #6b7280;
}

body.dark-mode .sidebar-nav a {
    color: #d1d5db;
}

body.dark-mode .sidebar-nav a:hover,
body.dark-mode .sidebar-nav a.active {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .drag-help-box {
    background: #0f172a;
    border-color: #374151;
}

body.dark-mode .drag-help-box strong {
    color: #f9fafb;
}

body.dark-mode .drag-help-box p {
    color: #9ca3af;
}

/* Folder/file sections */

body.dark-mode .folder-section-header {
    background: #0f172a;
    border-bottom-color: #1f2937;
}

body.dark-mode .file-row {
    border-bottom-color: #1f2937;
}

body.dark-mode .file-row:hover {
    background: #0f172a;
}

body.dark-mode .folder-footer {
    border-top-color: #1f2937;
}

body.dark-mode .empty-state,
body.dark-mode .no-search-results,
body.dark-mode .search-box,
body.dark-mode .sort-box,
body.dark-mode .preview-body {
    background: #0f172a;
    border-color: #374151;
}

/* Modal */

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

body.dark-mode .modal-close {
    background: #1f2937;
    color: #d1d5db;
}

body.dark-mode .modal-close:hover {
    background: #374151;
    color: #ffffff;
}

/* Storage */

body.dark-mode .storage-progress {
    background: #1f2937;
}

body.dark-mode .storage-header strong {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .storage-warning {
    background: #431407;
    border-color: #9a3412;
    color: #fed7aa;
}

/* Alerts */

body.dark-mode .alert-success,
body.dark-mode .toast.success {
    background: #052e16;
    color: #bbf7d0;
    border-color: #166534;
}

body.dark-mode .alert-error,
body.dark-mode .toast.error {
    background: #450a0a;
    color: #fecaca;
    border-color: #991b1b;
}

/* File icons in dark mode */

body.dark-mode .file-type-pdf {
    background: #7f1d1d;
    color: #fecaca;
}

body.dark-mode .file-type-image {
    background: #14532d;
    color: #bbf7d0;
}

body.dark-mode .file-type-word {
    background: #1e3a8a;
    color: #bfdbfe;
}

body.dark-mode .file-type-excel {
    background: #064e3b;
    color: #a7f3d0;
}

body.dark-mode .file-type-powerpoint {
    background: #7c2d12;
    color: #fed7aa;
}

body.dark-mode .file-type-archive {
    background: #78350f;
    color: #fde68a;
}

body.dark-mode .file-type-text {
    background: #312e81;
    color: #c7d2fe;
}

body.dark-mode .file-type-default {
    background: #374151;
    color: #f3f4f6;
}

/* Drag and drop */

body.dark-mode .is-dragging-file .sortable-file-list {
    outline-color: #818cf8;
    background: #111827;
}

body.dark-mode .file-chosen {
    background: #1e1b4b !important;
}

body.dark-mode .file-ghost {
    background: #312e81 !important;
}

/* Mobile */

@media (max-width: 850px) {
    body.dark-mode .topbar-right {
        border-top: 1px solid #1f2937;
        padding-top: 12px;
    }
}

.auth-theme-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

/* Profile page */

.profile-top-link {
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 6px 8px;
    transition: 0.2s ease;
}

.profile-top-link:hover {
    background: #f3f4f6;
}

.profile-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-card,
.settings-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 24px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 16px;
}

.profile-card h2,
.settings-card h2 {
    font-size: 22px;
    margin-bottom: 7px;
    color: #111827;
}

.profile-card p,
.settings-card p,
.profile-muted {
    color: #6b7280;
    line-height: 1.5;
}

.profile-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.profile-meta div,
.profile-stats div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 13px;
}

.profile-meta span,
.profile-stats span {
    display: block;
    font-size: 13px;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-meta strong,
.profile-stats strong {
    color: #111827;
    font-size: 16px;
}

.profile-storage-progress {
    margin: 16px 0;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* Dark mode profile */

body.dark-mode .profile-top-link:hover {
    background: #1f2937;
}

body.dark-mode .profile-card,
body.dark-mode .settings-card {
    background: #111827;
    border-color: #1f2937;
    color: #f9fafb;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

body.dark-mode .profile-card h2,
body.dark-mode .settings-card h2,
body.dark-mode .profile-meta strong,
body.dark-mode .profile-stats strong {
    color: #f9fafb;
}

body.dark-mode .profile-card p,
body.dark-mode .settings-card p,
body.dark-mode .profile-muted,
body.dark-mode .profile-meta span,
body.dark-mode .profile-stats span {
    color: #9ca3af;
}

body.dark-mode .profile-meta div,
body.dark-mode .profile-stats div {
    background: #0f172a;
    border-color: #374151;
}

@media (max-width: 1000px) {
    .profile-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .password-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .profile-card,
    .settings-card {
        padding: 18px;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }

    .settings-form .btn {
        width: 100%;
    }
}

/* Admin panel */

.admin-stats-grid {
    margin-bottom: 18px;
}

.admin-toolbar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 18px;
}

.admin-table-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.admin-table th {
    background: #f9fafb;
    color: #374151;
    font-size: 13px;
    text-align: left;
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
    vertical-align: middle;
    font-size: 14px;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-cell strong {
    display: block;
    color: #111827;
    margin-bottom: 3px;
}

.admin-user-cell span {
    display: block;
    color: #6b7280;
    font-size: 13px;
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.status-admin {
    background: #eef2ff;
    color: #4f46e5;
}

.status-user {
    background: #f3f4f6;
    color: #374151;
}

.status-active {
    background: #ecfdf5;
    color: #047857;
}

.status-disabled {
    background: #fef2f2;
    color: #991b1b;
}

.admin-muted {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

.admin-no-results {
    margin: 18px;
}

body.dark-mode .admin-toolbar,
body.dark-mode .admin-table-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .admin-table th {
    background: #0f172a;
    color: #d1d5db;
    border-bottom-color: #1f2937;
}

body.dark-mode .admin-table td {
    color: #f9fafb;
    border-bottom-color: #1f2937;
}

body.dark-mode .admin-user-cell strong {
    color: #f9fafb;
}

body.dark-mode .admin-user-cell span,
body.dark-mode .admin-muted {
    color: #9ca3af;
}

body.dark-mode .status-admin {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .status-user {
    background: #374151;
    color: #f3f4f6;
}

body.dark-mode .status-active {
    background: #052e16;
    color: #bbf7d0;
}

body.dark-mode .status-disabled {
    background: #450a0a;
    color: #fecaca;
}

/* Admin role editor */

.role-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.role-select {
    min-width: 100px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    outline: none;
    transition: 0.2s ease;
}

.role-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.admin-small-note {
    margin-top: 6px;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 700;
}

body.dark-mode .role-select {
    background: #0f172a;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-mode .role-select:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

body.dark-mode .admin-small-note {
    color: #9ca3af;
}

@media (max-width: 700px) {
    .role-form {
        flex-direction: column;
        align-items: stretch;
    }

    .role-form .btn,
    .role-select {
        width: 100%;
    }
}

/* Privacy admin box */

.privacy-admin-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
}

.privacy-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.privacy-admin-box h2 {
    font-size: 18px;
    margin-bottom: 6px;
    color: #111827;
}

.privacy-admin-box p {
    color: #4b5563;
    line-height: 1.5;
    font-size: 14px;
}

/* Dark mode privacy box */

body.dark-mode .privacy-admin-box {
    background: #1e1b4b;
    border-color: #312e81;
}

body.dark-mode .privacy-admin-box h2 {
    color: #f9fafb;
}

body.dark-mode .privacy-admin-box p {
    color: #c7d2fe;
}

body.dark-mode .privacy-icon {
    background: #6366f1;
}

@media (max-width: 700px) {
    .privacy-admin-box {
        flex-direction: column;
    }
}

/* Shared file page */

.shared-page {
    min-height: 100vh;
}

.shared-container {
    width: 100%;
    max-width: 560px;
}

.shared-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.shared-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    color: #111827;
    font-size: 18px;
}

.shared-file-icon {
    width: 86px;
    height: 86px;
    border-radius: 26px;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
}

.shared-card h1 {
    font-size: 26px;
    color: #111827;
    word-break: break-word;
    margin-bottom: 10px;
}

.shared-meta {
    color: #6b7280;
    margin-bottom: 24px;
}

.shared-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}

.shared-note {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Dark mode shared page */

body.dark-mode .shared-card {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

body.dark-mode .shared-brand,
body.dark-mode .shared-card h1 {
    color: #f9fafb;
}

body.dark-mode .shared-meta,
body.dark-mode .shared-note {
    color: #9ca3af;
}

@media (max-width: 700px) {
    .shared-card {
        padding: 24px;
    }

    .shared-actions {
        flex-direction: column;
    }

    .shared-actions .btn {
        width: 100%;
    }
}

/* Share expiry */

.share-expiry-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.shared-expiry {
    margin-top: 14px;
    color: #6b7280;
    font-size: 14px;
}

.shared-expiry strong {
    color: #111827;
}

body.dark-mode .share-expiry-label {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .shared-expiry {
    color: #9ca3af;
}

body.dark-mode .shared-expiry strong {
    color: #f9fafb;
}

@media (max-width: 700px) {
    .share-expiry-label {
        width: 100%;
        justify-content: center;
    }
}

/* Shared links overview */

.shared-stats-grid {
    margin-bottom: 18px;
}

.shared-toolbar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 18px;
}

.shared-links-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.shared-link-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.shared-link-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 13px;
    flex: 1;
}

.shared-link-info {
    min-width: 0;
}

.shared-link-info h2 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 5px;
    word-break: break-word;
}

.shared-link-info p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 9px;
}

.shared-link-url {
    max-width: 100%;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 12px;
    padding: 9px 10px;
    border-radius: 12px;
    word-break: break-all;
    line-height: 1.45;
}

.shared-link-side {
    min-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.shared-link-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.shared-link-actions form {
    margin: 0;
}

.share-expiry-warning {
    background: #fff7ed;
    color: #c2410c;
}

/* Dark mode shared links overview */

body.dark-mode .shared-toolbar,
body.dark-mode .shared-link-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .shared-link-info h2 {
    color: #f9fafb;
}

body.dark-mode .shared-link-info p {
    color: #9ca3af;
}

body.dark-mode .shared-link-url {
    background: #0f172a;
    border-color: #374151;
    color: #9ca3af;
}

body.dark-mode .share-expiry-warning {
    background: #431407;
    color: #fed7aa;
}

@media (max-width: 850px) {
    .shared-link-card {
        flex-direction: column;
    }

    .shared-link-side {
        width: 100%;
        min-width: 0;
        align-items: stretch;
    }

    .shared-link-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .shared-link-actions .btn,
    .shared-link-actions form,
    .shared-link-actions form button {
        width: 100%;
    }
}

/* Shared link download stats */

.shared-download-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.shared-download-stats span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

body.dark-mode .shared-download-stats span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

@media (max-width: 700px) {
    .shared-download-stats {
        flex-direction: column;
    }

    .shared-download-stats span {
        width: 100%;
        justify-content: center;
    }
}

/* Favorites */

.favorite-btn {
    min-width: 94px;
}

.favorite-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 15px;
    margin-left: 6px;
}

.favorite-stats-grid {
    margin-bottom: 18px;
}

.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.favorite-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.favorite-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    flex: 1;
}

.favorite-info {
    min-width: 0;
}

.favorite-info h2 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 5px;
    word-break: break-word;
}

.favorite-info p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 9px;
    line-height: 1.45;
}

.favorite-actions {
    min-width: 260px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.favorite-actions form {
    margin: 0;
}

/* Dark mode favorites */

body.dark-mode .favorite-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .favorite-info h2 {
    color: #f9fafb;
}

body.dark-mode .favorite-info p {
    color: #9ca3af;
}

@media (max-width: 850px) {
    .favorite-card {
        flex-direction: column;
    }

    .favorite-actions {
        width: 100%;
        min-width: 0;
        justify-content: stretch;
        flex-direction: column;
    }

    .favorite-actions .btn,
    .favorite-actions form,
    .favorite-actions form button {
        width: 100%;
    }
}

/* Recent files */

.recent-stats-grid {
    margin-bottom: 18px;
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recent-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.recent-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    flex: 1;
}

.recent-info {
    min-width: 0;
}

.recent-info h2 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 5px;
    word-break: break-word;
}

.recent-info p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 9px;
    line-height: 1.45;
}

.recent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-tags span {
    display: inline-flex;
    align-items: center;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.recent-actions {
    min-width: 260px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-actions form {
    margin: 0;
}

/* Dark mode recent files */

body.dark-mode .recent-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .recent-info h2 {
    color: #f9fafb;
}

body.dark-mode .recent-info p {
    color: #9ca3af;
}

body.dark-mode .recent-tags span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

@media (max-width: 850px) {
    .recent-card {
        flex-direction: column;
    }

    .recent-actions {
        width: 100%;
        min-width: 0;
        justify-content: stretch;
        flex-direction: column;
    }

    .recent-actions .btn,
    .recent-actions form,
    .recent-actions form button {
        width: 100%;
    }
}

/* Folder page / Step 26 */

.folder-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 700;
}

.folder-breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.folder-breadcrumb a:hover {
    text-decoration: underline;
}

.folder-breadcrumb strong {
    color: #111827;
}

.folder-stats-grid {
    margin-bottom: 18px;
}

.folder-file-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.folder-file-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.folder-file-main {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
    flex: 1;
}

.folder-file-info {
    min-width: 0;
}

.folder-file-info h2 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 5px;
    word-break: break-word;
}

.folder-file-info p {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 9px;
    line-height: 1.45;
}

.folder-file-actions {
    min-width: 320px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.folder-file-actions form {
    margin: 0;
}

.folder-open-link {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

.folder-open-link:hover h2,
.folder-open-link:hover h3 {
    color: #4f46e5;
}

.folder-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

body.dark-mode .folder-breadcrumb {
    color: #9ca3af;
}

body.dark-mode .folder-breadcrumb a {
    color: #a5b4fc;
}

body.dark-mode .folder-breadcrumb strong {
    color: #f9fafb;
}

body.dark-mode .folder-file-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .folder-file-info h2 {
    color: #f9fafb;
}

body.dark-mode .folder-file-info p {
    color: #9ca3af;
}

body.dark-mode .folder-open-link:hover h2,
body.dark-mode .folder-open-link:hover h3 {
    color: #a5b4fc;
}

@media (max-width: 900px) {
    .folder-file-card {
        flex-direction: column;
    }

    .folder-file-actions {
        width: 100%;
        min-width: 0;
        justify-content: stretch;
        flex-direction: column;
    }

    .folder-file-actions .btn,
    .folder-file-actions form,
    .folder-file-actions form button {
        width: 100%;
    }
}

/* Subfolders */

.subfolder-section {
    margin-bottom: 22px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.section-title-row h2 {
    font-size: 20px;
    color: #111827;
    margin-bottom: 4px;
}

.section-title-row p {
    color: #6b7280;
    font-size: 14px;
}

.subfolder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.subfolder-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}

.subfolder-open {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    margin-bottom: 14px;
}

.subfolder-open h3 {
    color: #111827;
    font-size: 16px;
    margin-bottom: 4px;
    word-break: break-word;
}

.subfolder-open p {
    color: #6b7280;
    font-size: 13px;
}

.subfolder-open:hover h3 {
    color: #4f46e5;
}

.subfolder-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.subfolder-actions form {
    margin: 0;
}

body.dark-mode .section-title-row h2 {
    color: #f9fafb;
}

body.dark-mode .section-title-row p {
    color: #9ca3af;
}

body.dark-mode .subfolder-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .subfolder-open h3 {
    color: #f9fafb;
}

body.dark-mode .subfolder-open p {
    color: #9ca3af;
}

body.dark-mode .subfolder-open:hover h3 {
    color: #a5b4fc;
}

@media (max-width: 700px) {
    .section-title-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .subfolder-actions {
        flex-direction: column;
    }

    .subfolder-actions .btn,
    .subfolder-actions form,
    .subfolder-actions form button {
        width: 100%;
    }
}

.folder-title-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.folder-title-link:hover .folder-name-text {
    color: #4f46e5;
}

body.dark-mode .folder-title-link:hover .folder-name-text {
    color: #a5b4fc;
}

/* Drag and drop upload */

.hidden-file-input {
    display: none;
}

.upload-dropzone {
    border: 2px dashed #c7d2fe;
    background: #eef2ff;
    border-radius: 20px;
    padding: 26px 18px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s ease;
    color: #4f46e5;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    background: #e0e7ff;
    border-color: #6366f1;
    transform: translateY(-1px);
}

.upload-dropzone-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px auto;
    border-radius: 18px;
    background: #4f46e5;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.upload-dropzone strong {
    display: block;
    font-size: 16px;
    color: #111827;
    margin-bottom: 5px;
}

.upload-dropzone span {
    display: block;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.upload-dropzone small {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.selected-files-list {
    margin-top: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px;
}

.selected-files-empty {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.selected-files-title {
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 8px;
}

.selected-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid #e5e7eb;
}

.selected-file-item span {
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    word-break: break-word;
}

.selected-file-item small {
    color: #6b7280;
    font-size: 12px;
    white-space: nowrap;
}

/* Dark mode drag and drop upload */

body.dark-mode .upload-dropzone {
    background: #1e1b4b;
    border-color: #312e81;
    color: #c7d2fe;
}

body.dark-mode .upload-dropzone:hover,
body.dark-mode .upload-dropzone.drag-over {
    background: #312e81;
    border-color: #818cf8;
}

body.dark-mode .upload-dropzone-icon {
    background: #6366f1;
}

body.dark-mode .upload-dropzone strong {
    color: #f9fafb;
}

body.dark-mode .upload-dropzone span {
    color: #c7d2fe;
}

body.dark-mode .upload-dropzone small {
    color: #a5b4fc;
}

body.dark-mode .selected-files-list {
    background: #0f172a;
    border-color: #374151;
}

body.dark-mode .selected-files-empty {
    color: #9ca3af;
}

body.dark-mode .selected-files-title,
body.dark-mode .selected-file-item span {
    color: #f9fafb;
}

body.dark-mode .selected-file-item {
    border-top-color: #374151;
}

body.dark-mode .selected-file-item small {
    color: #9ca3af;
}

/* Upload progressbar */

.upload-progress-wrap {
    display: none;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 13px;
    margin-top: 12px;
}

.upload-progress-wrap.show {
    display: block;
}

.upload-progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.upload-progress-top span {
    color: #4b5563;
    font-size: 13px;
    font-weight: 800;
}

.upload-progress-top strong {
    color: #111827;
    font-size: 13px;
    font-weight: 900;
}

.upload-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.upload-progress-fill {
    width: 0%;
    height: 100%;
    background: #4f46e5;
    border-radius: 999px;
    transition: width 0.2s ease;
}

/* Dark mode progressbar */

body.dark-mode .upload-progress-wrap {
    background: #0f172a;
    border-color: #374151;
}

body.dark-mode .upload-progress-top span {
    color: #d1d5db;
}

body.dark-mode .upload-progress-top strong {
    color: #f9fafb;
}

body.dark-mode .upload-progress-bar {
    background: #374151;
}

body.dark-mode .upload-progress-fill {
    background: #818cf8;
}

/* Activity log */

.activity-stats-grid {
    margin-bottom: 18px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.activity-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 15px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.activity-content {
    min-width: 0;
    flex: 1;
}

.activity-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 6px;
}

.activity-top h2 {
    color: #111827;
    font-size: 16px;
}

.activity-top span {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.activity-item-name {
    display: block;
    color: #374151;
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-word;
}

.activity-content p {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

/* Dark mode activity log */

body.dark-mode .activity-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .activity-icon {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .activity-top h2 {
    color: #f9fafb;
}

body.dark-mode .activity-top span {
    color: #9ca3af;
}

body.dark-mode .activity-item-name {
    color: #d1d5db;
}

body.dark-mode .activity-content p {
    color: #9ca3af;
}

@media (max-width: 700px) {
    .activity-card {
        flex-direction: column;
    }

    .activity-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-top span {
        white-space: normal;
    }
}

/* Settings page */

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: flex-start;
}

.settings-card,
.settings-info-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.settings-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.settings-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 16px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.settings-card-header h2,
.settings-info-card h2 {
    color: #111827;
    font-size: 20px;
    margin-bottom: 5px;
}

.settings-card-header p,
.settings-info-card p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-mini-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 18px;
}

.settings-mini-list span {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

/* Dark mode settings */

body.dark-mode .settings-card,
body.dark-mode .settings-info-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .settings-icon {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .settings-card-header h2,
body.dark-mode .settings-info-card h2 {
    color: #f9fafb;
}

body.dark-mode .settings-card-header p,
body.dark-mode .settings-info-card p {
    color: #9ca3af;
}

body.dark-mode .settings-mini-list span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

@media (max-width: 900px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }
}

/* Step 34 - Mobile improvements */

/* Mobile bottom navigation */

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 760px) {
    body.dashboard-page {
        padding-bottom: 86px;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 999;
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid #e5e7eb;
        border-radius: 22px;
        padding: 8px;
        box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
        backdrop-filter: blur(14px);
    }

    .mobile-bottom-nav a {
        min-width: 0;
        color: #6b7280;
        text-decoration: none;
        border-radius: 16px;
        padding: 8px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        font-weight: 900;
        transition: 0.2s ease;
    }

    .mobile-bottom-nav a span {
        font-size: 18px;
        line-height: 1;
    }

    .mobile-bottom-nav a small {
        font-size: 10px;
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        background: #eef2ff;
        color: #4f46e5;
    }

    body.dark-mode .mobile-bottom-nav {
        background: rgba(17, 24, 39, 0.96);
        border-color: #1f2937;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
    }

    body.dark-mode .mobile-bottom-nav a {
        color: #9ca3af;
    }

    body.dark-mode .mobile-bottom-nav a.active,
    body.dark-mode .mobile-bottom-nav a:hover {
        background: #1e1b4b;
        color: #c7d2fe;
    }
}

/* Better mobile dashboard layout */

@media (max-width: 760px) {
    .topbar {
        position: sticky;
        top: 0;
        z-index: 100;
        height: auto;
        padding: 14px;
        border-radius: 0 0 22px 22px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .topbar-right {
        gap: 8px;
        flex-wrap: wrap;
    }

    .profile-top-link {
        flex: 1;
        min-width: 0;
    }

    .user-info {
        text-align: left;
        min-width: 0;
    }

    .user-info strong,
    .user-info span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right .btn,
    .theme-toggle {
        padding: 9px 11px;
        border-radius: 12px;
        font-size: 13px;
    }

    .dashboard-layout {
        display: block;
        padding: 12px;
    }

    .sidebar {
        position: static;
        height: auto;
        margin-bottom: 12px;
        padding: 14px;
        border-radius: 18px;
    }

    /*
       På mobil bruger vi bottom-nav til navigation.
       Sidebar beholder stadig vigtige knapper som Upload/Ny mappe.
    */
    .sidebar-nav {
        display: none;
    }

    .drag-help-box,
    .privacy-admin-box {
        display: none;
    }

    .storage-box {
        margin-top: 10px;
    }

    .content {
        padding: 16px;
        border-radius: 18px;
        min-height: auto;
    }

    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        margin-bottom: 18px;
    }

    .content-header h1 {
        font-size: 24px;
    }

    .content-header p {
        font-size: 14px;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .header-actions .btn,
    .content-header .btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        border-radius: 16px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 13px;
        font-size: 20px;
    }

    .stat-card span {
        font-size: 12px;
    }

    .stat-card strong {
        font-size: 16px;
    }
}

@media (max-width: 430px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Better mobile cards */

@media (max-width: 760px) {
    .folder-card,
    .file-card,
    .recent-card,
    .favorite-card,
    .shared-link-card,
    .folder-file-card,
    .activity-card,
    .admin-table-card,
    .settings-card,
    .settings-info-card,
    .profile-card,
    .trash-card {
        border-radius: 18px;
    }

    .folder-header,
    .folder-title,
    .folder-title-link,
    .file-row,
    .recent-card,
    .favorite-card,
    .shared-link-card,
    .folder-file-card {
        flex-direction: column;
        align-items: stretch;
    }

    .file-actions,
    .recent-actions,
    .favorite-actions,
    .shared-link-actions,
    .folder-file-actions,
    .subfolder-actions {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .file-actions .btn,
    .file-actions form,
    .file-actions form button,
    .recent-actions .btn,
    .recent-actions form,
    .recent-actions form button,
    .favorite-actions .btn,
    .favorite-actions form,
    .favorite-actions form button,
    .shared-link-actions .btn,
    .shared-link-actions form,
    .shared-link-actions form button,
    .folder-file-actions .btn,
    .folder-file-actions form,
    .folder-file-actions form button,
    .subfolder-actions .btn,
    .subfolder-actions form,
    .subfolder-actions form button {
        width: 100%;
    }

    .file-info,
    .recent-info,
    .favorite-info,
    .shared-link-info,
    .folder-file-info {
        min-width: 0;
        width: 100%;
    }

    .file-info h3,
    .recent-info h2,
    .favorite-info h2,
    .shared-link-info h2,
    .folder-file-info h2 {
        font-size: 16px;
        word-break: break-word;
    }

    .shared-link-url {
        font-size: 11px;
        max-height: 90px;
        overflow: auto;
    }

    .folder-grid,
    .subfolder-grid {
        grid-template-columns: 1fr;
    }

    .sort-box,
    .search-box,
    .admin-toolbar,
    .shared-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sort-group {
        width: 100%;
    }

    .sort-group select,
    .search-input-wrap input {
        width: 100%;
    }
}

/* Mobile modals */

@media (max-width: 760px) {
    .modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .modal-card {
        width: 100%;
        max-width: none;
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 22px 22px 16px 16px;
    }

    .preview-card {
        height: 92vh;
    }

    .modal-header {
        gap: 12px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-actions .btn,
    .modal-actions button,
    .modal-actions a {
        width: 100%;
    }

    .preview-body {
        min-height: 55vh;
    }

    .preview-frame {
        min-height: 55vh;
    }

    .upload-dropzone {
        padding: 22px 14px;
    }

    .selected-file-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .selected-file-item small {
        white-space: normal;
    }
}

/* Mobile tables */

@media (max-width: 760px) {
    .admin-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 900px;
    }
}

/* Mobile auth/shared public pages */

@media (max-width: 760px) {
    .auth-card,
    .shared-card {
        margin: 12px;
        padding: 24px;
        border-radius: 22px;
    }

    .shared-actions {
        flex-direction: column;
    }

    .shared-actions .btn {
        width: 100%;
    }
}

/* Step 35 - Backup / export */

.backup-stats-grid {
    margin-bottom: 18px;
}

.backup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.backup-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.backup-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 17px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.backup-content {
    flex: 1;
    min-width: 0;
}

.backup-content h2 {
    color: #111827;
    font-size: 18px;
    margin-bottom: 7px;
}

.backup-content p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.backup-content form {
    margin-top: 10px;
}

.backup-mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.backup-mini-list span {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #374151;
    border-radius: 14px;
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 800;
}

.privacy-backup-card {
    grid-column: span 2;
}

/* Dark mode backup */

body.dark-mode .backup-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .backup-icon {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .backup-content h2 {
    color: #f9fafb;
}

body.dark-mode .backup-content p {
    color: #9ca3af;
}

body.dark-mode .backup-mini-list span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

@media (max-width: 900px) {
    .backup-grid {
        grid-template-columns: 1fr;
    }

    .privacy-backup-card {
        grid-column: span 1;
    }
}

@media (max-width: 760px) {
    .backup-card {
        flex-direction: column;
        border-radius: 18px;
    }

    .backup-content form .btn {
        width: 100%;
    }
}

/* Step 36 - Global search */

.global-search-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.global-search-input-wrap {
    position: relative;
    margin-bottom: 14px;
}

.global-search-input-wrap span {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.global-search-input-wrap input {
    width: 100%;
    padding: 15px 16px 15px 45px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    background: #f9fafb;
    outline: none;
}

.global-search-input-wrap input:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.global-search-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.search-button-group .btn {
    min-height: 44px;
}

.search-summary-card {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.search-summary-card div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-summary-card strong {
    color: #4f46e5;
    font-size: 24px;
    line-height: 1;
}

.search-summary-card span {
    color: #4338ca;
    font-size: 13px;
    font-weight: 800;
}

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

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.section-title-row h2 {
    color: #111827;
    font-size: 20px;
}

.section-title-row span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

.search-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.search-folder-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.search-folder-card:hover {
    transform: translateY(-2px);
    border-color: #c7d2fe;
    box-shadow: 0 16px 34px rgba(79, 70, 229, 0.12);
}

.search-folder-card h3 {
    color: #111827;
    font-size: 15px;
    margin-bottom: 4px;
    word-break: break-word;
}

.search-folder-card p {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-result-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 15px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.search-result-info {
    min-width: 0;
}

.search-result-info h3 {
    color: #111827;
    font-size: 16px;
    margin-bottom: 5px;
    word-break: break-word;
}

.search-result-info p {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.search-result-info span {
    color: #4b5563;
    font-size: 12px;
    font-weight: 800;
}

.search-result-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

/* Dark mode search */

body.dark-mode .global-search-panel,
body.dark-mode .search-folder-card,
body.dark-mode .search-result-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .global-search-input-wrap input {
    background: #0f172a;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-mode .global-search-input-wrap input:focus {
    border-color: #818cf8;
    background: #111827;
}

body.dark-mode .search-summary-card {
    background: #1e1b4b;
    border-color: #312e81;
}

body.dark-mode .search-summary-card strong,
body.dark-mode .search-summary-card span {
    color: #c7d2fe;
}

body.dark-mode .section-title-row h2,
body.dark-mode .search-folder-card h3,
body.dark-mode .search-result-info h3 {
    color: #f9fafb;
}

body.dark-mode .section-title-row span,
body.dark-mode .search-folder-card p,
body.dark-mode .search-result-info p {
    color: #9ca3af;
}

body.dark-mode .search-result-info span {
    color: #d1d5db;
}

/* Mobile search */

@media (max-width: 900px) {
    .global-search-filters {
        grid-template-columns: 1fr 1fr;
    }

    .search-button-group {
        grid-column: span 2;
    }

    .search-button-group .btn {
        width: 100%;
    }

    .search-result-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .search-result-actions {
        justify-content: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .search-result-actions .btn,
    .search-result-actions a,
    .search-result-actions button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .global-search-filters {
        grid-template-columns: 1fr;
    }

    .search-button-group {
        grid-column: span 1;
    }

    .search-summary-card {
        flex-direction: column;
        align-items: stretch;
    }

    .search-summary-card .btn {
        width: 100%;
    }

    .search-folder-grid {
        grid-template-columns: 1fr;
    }
}

/* Step 37 - Notifications */

.nav-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-stats-grid {
    margin-bottom: 18px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.notification-card.unread {
    border-color: #c7d2fe;
    background: #f8faff;
}

.notification-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 15px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.notification-content {
    min-width: 0;
    flex: 1;
}

.notification-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 7px;
}

.notification-type {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 5px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
}

.notification-top h2 {
    color: #111827;
    font-size: 16px;
}

.notification-top time {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.notification-content p {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 10px;
}

.notification-action-form {
    margin-top: 8px;
}

.notification-read-label {
    color: #10b981;
    font-size: 12px;
    font-weight: 900;
}

/* Dark mode notifications */

body.dark-mode .nav-badge {
    background: #ef4444;
    color: #ffffff;
}

body.dark-mode .notification-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .notification-card.unread {
    background: #111827;
    border-color: #312e81;
}

body.dark-mode .notification-icon,
body.dark-mode .notification-type {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .notification-top h2 {
    color: #f9fafb;
}

body.dark-mode .notification-top time,
body.dark-mode .notification-content p {
    color: #9ca3af;
}

body.dark-mode .notification-read-label {
    color: #34d399;
}

@media (max-width: 760px) {
    .notification-card {
        flex-direction: column;
        border-radius: 18px;
    }

    .notification-top {
        flex-direction: column;
        gap: 8px;
    }

    .notification-top time {
        white-space: normal;
    }

    .notification-action-form .btn {
        width: 100%;
    }
}

/* Step 38 - Better admin dashboard */

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-overview-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 17px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.admin-overview-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 16px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.admin-overview-card span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 4px;
}

.admin-overview-card strong {
    display: block;
    color: #111827;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

.admin-overview-card small {
    display: block;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    margin-top: 4px;
}

.admin-privacy-notice {
    background: #f8faff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.admin-privacy-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 15px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.admin-privacy-notice h2 {
    color: #111827;
    font-size: 16px;
    margin-bottom: 5px;
}

.admin-privacy-notice p {
    color: #4b5563;
    font-size: 13px;
    line-height: 1.5;
}

/* Dark mode admin dashboard */

body.dark-mode .admin-overview-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .admin-overview-icon,
body.dark-mode .admin-privacy-icon {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .admin-overview-card span {
    color: #9ca3af;
}

body.dark-mode .admin-overview-card strong {
    color: #f9fafb;
}

body.dark-mode .admin-overview-card small {
    color: #6b7280;
}

body.dark-mode .admin-privacy-notice {
    background: #111827;
    border-color: #312e81;
}

body.dark-mode .admin-privacy-notice h2 {
    color: #f9fafb;
}

body.dark-mode .admin-privacy-notice p {
    color: #9ca3af;
}

@media (max-width: 1000px) {
    .admin-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .admin-overview-grid {
        grid-template-columns: 1fr;
    }

    .admin-overview-card,
    .admin-privacy-notice {
        border-radius: 18px;
    }
}
/* Dashboard compact folder overview */

.dashboard-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 16px;
    align-items: start;
}

.dashboard-folder-tile {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 18px;
    min-height: 128px;
    padding: 8px;
    transition: 0.2s ease;
}

.dashboard-folder-tile:hover {
    background: #f8faff;
}

.dashboard-folder-open {
    min-height: 112px;
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 9px;
    border-radius: 16px;
    padding: 10px 8px;
}

.dashboard-folder-icon {
    width: 56px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 43px;
    line-height: 1;
    filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.10));
}

.dashboard-folder-text {
    width: 100%;
    min-width: 0;
}

.dashboard-folder-text h2 {
    color: #111827;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 900;
    margin: 0 0 3px 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.dashboard-folder-text p {
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    margin: 0;
}

.dashboard-folder-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    transition: 0.2s ease;
}

.dashboard-folder-tile:hover .dashboard-folder-actions,
.dashboard-folder-tile:focus-within .dashboard-folder-actions {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dashboard-folder-actions form {
    margin: 0;
}

.dashboard-folder-action {
    width: 30px;
    height: 30px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: 0.2s ease;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.dashboard-folder-action:hover {
    border-color: #c7d2fe;
    background: #eef2ff;
    color: #4f46e5;
    transform: translateY(-1px);
}

.dashboard-folder-action.danger:hover {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

body.dark-mode .dashboard-folder-tile:hover {
    background: #111827;
}

body.dark-mode .dashboard-folder-text h2 {
    color: #f9fafb;
}

body.dark-mode .dashboard-folder-text p {
    color: #9ca3af;
}

body.dark-mode .dashboard-folder-action {
    background: #111827;
    border-color: #374151;
    color: #d1d5db;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

body.dark-mode .dashboard-folder-action:hover {
    background: #1e1b4b;
    border-color: #312e81;
    color: #c7d2fe;
}

body.dark-mode .dashboard-folder-action.danger:hover {
    background: #451a1a;
    border-color: #7f1d1d;
    color: #fecaca;
}

@media (max-width: 760px) {
    .dashboard-folder-grid {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }

    .dashboard-folder-tile {
        min-height: 112px;
        padding: 5px;
    }

    .dashboard-folder-open {
        min-height: 100px;
        padding: 8px 5px;
    }

    .dashboard-folder-icon {
        font-size: 38px;
    }

    .dashboard-folder-text h2 {
        font-size: 12px;
    }

    .dashboard-folder-text p {
        font-size: 11px;
    }

    .dashboard-folder-actions {
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .dashboard-folder-action {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Step 40 - Three dots actions menu */

.action-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
}

.action-menu-button {
    width: 38px;
    height: 38px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #4b5563;
    border-radius: 13px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-menu-button:hover,
.action-menu-button.active {
    background: #eef2ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}

.action-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 7px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
    display: none;
}

.action-menu.show {
    display: block;
}

.action-menu a,
.action-menu button {
    width: 100%;
    border: none;
    background: transparent;
    color: #374151;
    text-decoration: none;
    border-radius: 11px;
    padding: 10px 11px;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    transition: 0.2s ease;
    font-family: inherit;
}

.action-menu a:hover,
.action-menu button:hover {
    background: #f3f4f6;
    color: #111827;
}

.action-menu .danger {
    color: #dc2626;
}

.action-menu .danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

.action-menu form {
    margin: 0;
}

.action-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 6px 4px;
}

/* Dark mode action menu */

body.dark-mode .action-menu-button {
    background: #111827;
    border-color: #374151;
    color: #d1d5db;
}

body.dark-mode .action-menu-button:hover,
body.dark-mode .action-menu-button.active {
    background: #1e1b4b;
    border-color: #312e81;
    color: #c7d2fe;
}

body.dark-mode .action-menu {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

body.dark-mode .action-menu a,
body.dark-mode .action-menu button {
    color: #d1d5db;
}

body.dark-mode .action-menu a:hover,
body.dark-mode .action-menu button:hover {
    background: #1f2937;
    color: #f9fafb;
}

body.dark-mode .action-menu .danger {
    color: #fca5a5;
}

body.dark-mode .action-menu .danger:hover {
    background: #450a0a;
    color: #fecaca;
}

body.dark-mode .action-menu-divider {
    background: #374151;
}

@media (max-width: 760px) {
    .action-menu {
        min-width: 210px;
    }

    .action-menu a,
    .action-menu button {
        padding: 12px;
        font-size: 14px;
    }
}
/* Step 40 polish - keep menu buttons visible and aligned */
.dashboard-folder-actions.action-menu-wrap,
.folder-file-actions.action-menu-wrap,
.recent-actions.action-menu-wrap,
.favorite-actions.action-menu-wrap,
.shared-link-actions.action-menu-wrap,
.search-result-actions.action-menu-wrap,
.file-actions.action-menu-wrap {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.dashboard-folder-actions.action-menu-wrap {
    top: 8px;
    right: 8px;
}

.dashboard-folder-actions.action-menu-wrap .action-menu-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 20px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.folder-file-actions.action-menu-wrap,
.recent-actions.action-menu-wrap,
.favorite-actions.action-menu-wrap,
.shared-link-actions.action-menu-wrap,
.search-result-actions.action-menu-wrap,
.file-actions.action-menu-wrap {
    min-width: 38px;
}

@media (max-width: 760px) {
    .dashboard-folder-actions.action-menu-wrap {
        top: 6px;
        right: 6px;
    }
}

/* Folder share info inside action menu */
.action-menu-info {
    margin: 4px 4px 7px 4px;
    padding: 10px 11px;
    border-radius: 12px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.action-menu-info strong {
    font-size: 12px;
    font-weight: 900;
}

.action-menu-info span {
    font-size: 11px;
    font-weight: 800;
    color: #4338ca;
}

body.dark-mode .action-menu-info {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .action-menu-info span {
    color: #a5b4fc;
}


/* Step 41 - Grid/List view toggle */

.view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 4px;
    flex-shrink: 0;
}

.view-toggle-btn {
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 11px;
    padding: 9px 11px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
    font-family: inherit;
}

.view-toggle-btn:hover,
.view-toggle-btn.active {
    background: #ffffff;
    color: #4f46e5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.section-title-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.folder-file-list.file-view-grid,
.recent-list.file-view-grid,
.favorites-list.file-view-grid,
.search-results-list.file-view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.folder-file-list.file-view-list,
.recent-list.file-view-list,
.favorites-list.file-view-list,
.search-results-list.file-view-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.file-view-grid .folder-file-card,
.file-view-grid .recent-card,
.file-view-grid .favorite-card {
    flex-direction: column;
    align-items: stretch;
    min-height: 210px;
}

.file-view-grid .folder-file-main,
.file-view-grid .recent-main,
.file-view-grid .favorite-main {
    flex-direction: column;
    align-items: flex-start;
}

.file-view-grid .file-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 18px;
}

.file-view-grid .folder-file-info h2,
.file-view-grid .recent-info h2,
.file-view-grid .favorite-info h2 {
    font-size: 15px;
}

.file-view-grid .folder-file-info p,
.file-view-grid .recent-info p,
.file-view-grid .favorite-info p {
    font-size: 12px;
}

.file-view-grid .folder-file-actions,
.file-view-grid .recent-actions,
.file-view-grid .favorite-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-end;
    margin-top: auto;
}

.file-view-grid .search-result-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 220px;
}

.file-view-grid .search-result-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: auto;
}

body.dark-mode .view-toggle {
    background: #0f172a;
    border-color: #374151;
}

body.dark-mode .view-toggle-btn {
    color: #9ca3af;
}

body.dark-mode .view-toggle-btn:hover,
body.dark-mode .view-toggle-btn.active {
    background: #1e1b4b;
    color: #c7d2fe;
}

@media (max-width: 760px) {
    .view-toggle {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .view-toggle-btn {
        width: 100%;
    }

    .section-title-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }

    .folder-file-list.file-view-grid,
    .recent-list.file-view-grid,
    .favorites-list.file-view-grid,
    .search-results-list.file-view-grid {
        grid-template-columns: 1fr;
    }
}

/* Step 42 - Better topbar search and notifications */

.topbar-brand-link {
    color: inherit;
    text-decoration: none;
}

.topbar-search-form {
    flex: 1;
    max-width: 560px;
    margin: 0 24px;
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search-form span {
    position: absolute;
    left: 15px;
    font-size: 16px;
    pointer-events: none;
}

.topbar-search-form input {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    border-radius: 16px;
    padding: 0 78px 0 43px;
    font-size: 14px;
    font-weight: 750;
    outline: none;
    transition: 0.2s ease;
}

.topbar-search-form input:focus {
    background: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.topbar-search-form button {
    position: absolute;
    right: 6px;
    height: 32px;
    border: none;
    border-radius: 12px;
    background: #4f46e5;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    padding: 0 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.topbar-search-form button:hover {
    background: #4338ca;
}

.topbar-icon-button {
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #111827;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.2s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-icon-button:hover {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.topbar-notification-wrap {
    position: relative;
}

.topbar-notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    background: #ef4444;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 10px;
    font-weight: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 220;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    padding: 10px;
    display: none;
}

.topbar-notification-dropdown.show {
    display: block;
}

.topbar-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 8px 11px 8px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 6px;
}

.topbar-dropdown-header strong {
    display: block;
    color: #111827;
    font-size: 15px;
    font-weight: 950;
}

.topbar-dropdown-header span {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
    margin-top: 2px;
}

.topbar-dropdown-header a {
    color: #4f46e5;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
}

.topbar-notification-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 360px;
    overflow-y: auto;
}

.topbar-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 15px;
    padding: 10px;
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

.topbar-notification-item:hover,
.topbar-notification-item.unread {
    background: #f8faff;
}

.topbar-notification-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 13px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.topbar-notification-item strong {
    display: block;
    color: #111827;
    font-size: 13px;
    font-weight: 950;
    margin-bottom: 3px;
}

.topbar-notification-item p {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.topbar-notification-item small {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 800;
    margin-top: 5px;
}

.topbar-notification-empty {
    padding: 22px 12px;
    text-align: center;
}

.topbar-notification-empty span {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
}

.topbar-notification-empty p {
    color: #6b7280;
    font-size: 13px;
    font-weight: 800;
}

body.dark-mode .topbar-search-form input,
body.dark-mode .topbar-icon-button {
    background: #0f172a;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-mode .topbar-search-form input:focus {
    background: #111827;
    border-color: #818cf8;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

body.dark-mode .topbar-search-form input::placeholder {
    color: #6b7280;
}

body.dark-mode .topbar-icon-button:hover {
    background: #1f2937;
}

body.dark-mode .topbar-notification-badge {
    border-color: #111827;
}

body.dark-mode .topbar-notification-dropdown {
    background: #111827;
    border-color: #1f2937;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

body.dark-mode .topbar-dropdown-header {
    border-bottom-color: #1f2937;
}

body.dark-mode .topbar-dropdown-header strong,
body.dark-mode .topbar-notification-item strong {
    color: #f9fafb;
}

body.dark-mode .topbar-dropdown-header span,
body.dark-mode .topbar-notification-item p,
body.dark-mode .topbar-notification-empty p {
    color: #9ca3af;
}

body.dark-mode .topbar-notification-item small {
    color: #6b7280;
}

body.dark-mode .topbar-notification-item:hover,
body.dark-mode .topbar-notification-item.unread {
    background: #1f2937;
}

body.dark-mode .topbar-notification-icon {
    background: #1e1b4b;
    color: #c7d2fe;
}

@media (max-width: 1100px) {
    .topbar-search-form {
        max-width: 420px;
        margin: 0 16px;
    }
}

@media (max-width: 760px) {
    .topbar {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .topbar-search-form {
        order: 3;
        grid-column: 1 / -1;
        max-width: none;
        margin: 0;
        width: 100%;
    }

    .topbar-search-form input {
        height: 42px;
    }

    .topbar-right {
        justify-content: flex-end;
    }

    .topbar-logout-button,
    .profile-top-link .user-info span {
        display: none;
    }

    .topbar-notification-dropdown {
        position: fixed;
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}

/* Step 43 - Mobile floating action button */

.mobile-fab-wrap {
    display: none;
}

@media (max-width: 760px) {
    .mobile-fab-wrap {
        position: fixed;
        right: 18px;
        bottom: 96px;
        z-index: 1200;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 12px;
        pointer-events: none;
    }

    .mobile-fab-button {
        width: 58px;
        height: 58px;
        border: none;
        border-radius: 22px;
        background: #4f46e5;
        color: #ffffff;
        font-size: 34px;
        line-height: 1;
        font-weight: 800;
        cursor: pointer;
        box-shadow: 0 18px 42px rgba(79, 70, 229, 0.38);
        transition: 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
    }

    .mobile-fab-button:hover,
    .mobile-fab-button.active {
        transform: translateY(-2px) scale(1.03);
        background: #4338ca;
    }

    .mobile-fab-button.active {
        transform: rotate(45deg);
        border-radius: 20px;
    }

    .mobile-fab-menu {
        width: 230px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #e5e7eb;
        border-radius: 22px;
        padding: 9px;
        box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24);
        backdrop-filter: blur(14px);
        display: none;
        pointer-events: auto;
        transform-origin: bottom right;
    }

    .mobile-fab-menu.show {
        display: block;
        animation: mobileFabIn 0.16s ease-out;
    }

    @keyframes mobileFabIn {
        from {
            opacity: 0;
            transform: translateY(8px) scale(0.96);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .mobile-fab-menu a,
    .mobile-fab-menu button {
        width: 100%;
        border: none;
        background: transparent;
        color: #374151;
        text-decoration: none;
        border-radius: 15px;
        padding: 13px 12px;
        font-size: 14px;
        font-weight: 900;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 10px;
        text-align: left;
        font-family: inherit;
        transition: 0.2s ease;
    }

    .mobile-fab-menu a:hover,
    .mobile-fab-menu button:hover {
        background: #eef2ff;
        color: #4f46e5;
    }

    .mobile-fab-menu span {
        width: 24px;
        min-width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 17px;
    }

    body.dark-mode .mobile-fab-button {
        background: #6366f1;
        box-shadow: 0 18px 42px rgba(99, 102, 241, 0.34);
    }

    body.dark-mode .mobile-fab-button:hover,
    body.dark-mode .mobile-fab-button.active {
        background: #818cf8;
        color: #111827;
    }

    body.dark-mode .mobile-fab-menu {
        background: rgba(17, 24, 39, 0.98);
        border-color: #1f2937;
        box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42);
    }

    body.dark-mode .mobile-fab-menu a,
    body.dark-mode .mobile-fab-menu button {
        color: #d1d5db;
    }

    body.dark-mode .mobile-fab-menu a:hover,
    body.dark-mode .mobile-fab-menu button:hover {
        background: #1e1b4b;
        color: #c7d2fe;
    }
}

@media (max-width: 380px) {
    .mobile-fab-wrap {
        right: 12px;
        bottom: 92px;
    }

    .mobile-fab-menu {
        width: 210px;
    }
}

/* Step 44 - Pinned folders */

.pinned-folder {
    position: relative;
}

.dashboard-folder-tile.pinned-folder,
.subfolder-card.pinned-folder,
.search-folder-card.pinned-folder {
    background: #fff7ed;
    border-color: #fed7aa;
}

.dashboard-folder-tile.pinned-folder:hover,
.subfolder-card.pinned-folder:hover,
.search-folder-card.pinned-folder:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

.pinned-folder-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 8px 18px rgba(249, 115, 22, 0.25);
}

.pinned-folder-badge.small {
    width: 24px;
    height: 24px;
    font-size: 12px;
    top: 9px;
    left: 9px;
}

body.dark-mode .dashboard-folder-tile.pinned-folder,
body.dark-mode .subfolder-card.pinned-folder,
body.dark-mode .search-folder-card.pinned-folder {
    background: rgba(124, 45, 18, 0.26);
    border-color: #7c2d12;
}

body.dark-mode .dashboard-folder-tile.pinned-folder:hover,
body.dark-mode .subfolder-card.pinned-folder:hover,
body.dark-mode .search-folder-card.pinned-folder:hover {
    background: rgba(124, 45, 18, 0.36);
    border-color: #c2410c;
}

body.dark-mode .pinned-folder-badge {
    background: #fb923c;
    color: #111827;
}

/* Step 45 - File tags / labels */

.file-tags-row,
.recent-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.file-tag-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #047857;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.tags-modal-card {
    max-width: 560px;
}

.tag-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-checkbox-item {
    cursor: pointer;
    user-select: none;
}

.tag-checkbox-item input {
    display: none;
}

.tag-checkbox-item span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    padding: 8px 11px;
    font-size: 13px;
    font-weight: 900;
    transition: 0.2s ease;
}

.tag-checkbox-item input:checked + span {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.tag-empty-box {
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    color: #6b7280;
    border-radius: 14px;
    padding: 14px;
    font-size: 13px;
    font-weight: 800;
}

body.dark-mode .file-tag-chip {
    background: rgba(6, 78, 59, 0.35);
    border-color: #065f46;
    color: #6ee7b7;
}

body.dark-mode .tag-checkbox-item span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

body.dark-mode .tag-checkbox-item input:checked + span {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

body.dark-mode .tag-empty-box {
    background: #0f172a;
    border-color: #374151;
    color: #9ca3af;
}

@media (max-width: 760px) {
    .tag-checkbox-grid {
        flex-direction: column;
    }

    .tag-checkbox-item span {
        width: 100%;
        justify-content: center;
    }
}

/* Step 46 - Upload progress per file */

.per-file-upload-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 13px;
}

.per-file-upload-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 11px;
}

.per-file-upload-item.uploading {
    border-color: #c7d2fe;
}

.per-file-upload-item.complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.per-file-upload-item.failed {
    border-color: #fecaca;
    background: #fef2f2;
}

.per-file-upload-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.per-file-upload-name {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-file-upload-name span {
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 8px;
    background: #eef2ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.per-file-upload-name strong {
    min-width: 0;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.per-file-upload-status {
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.per-file-upload-bar {
    width: 100%;
    height: 7px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.per-file-upload-fill {
    width: 0%;
    height: 100%;
    background: #4f46e5;
    border-radius: 999px;
    transition: width 0.18s ease;
}

.per-file-upload-item.complete .per-file-upload-fill {
    background: #22c55e;
}

.per-file-upload-item.failed .per-file-upload-fill {
    background: #ef4444;
}

body.dark-mode .per-file-upload-item {
    background: #111827;
    border-color: #374151;
}

body.dark-mode .per-file-upload-item.uploading {
    border-color: #312e81;
}

body.dark-mode .per-file-upload-item.complete {
    background: #052e16;
    border-color: #166534;
}

body.dark-mode .per-file-upload-item.failed {
    background: #450a0a;
    border-color: #7f1d1d;
}

body.dark-mode .per-file-upload-name span {
    background: #1e1b4b;
}

body.dark-mode .per-file-upload-name strong {
    color: #f9fafb;
}

body.dark-mode .per-file-upload-status {
    color: #9ca3af;
}

body.dark-mode .per-file-upload-bar {
    background: #374151;
}

body.dark-mode .per-file-upload-fill {
    background: #818cf8;
}

@media (max-width: 760px) {
    .per-file-upload-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .per-file-upload-name strong {
        white-space: normal;
        word-break: break-word;
    }
}

/* Step 47 - File details panel */

.file-details-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.42);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.file-details-overlay.show {
    opacity: 1;
    visibility: visible;
}

.file-details-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1201;
    width: min(460px, 100%);
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -20px 0 60px rgba(15, 23, 42, 0.22);
    transform: translateX(105%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.file-details-panel.show {
    transform: translateX(0);
}

.file-details-header {
    padding: 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.file-details-kicker {
    display: inline-flex;
    color: #4f46e5;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.file-details-header h2 {
    color: #111827;
    font-size: 21px;
    line-height: 1.2;
    word-break: break-word;
}

.file-details-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #4b5563;
    border-radius: 13px;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
}

.file-details-close:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.file-details-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}

.file-details-loading,
.file-details-error {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 800;
}

.file-details-error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.file-details-main-icon {
    width: 74px;
    height: 74px;
    border-radius: 24px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 1000;
    margin-bottom: 16px;
}

.file-details-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 18px;
}

.file-details-actions .btn {
    width: 100%;
}

.file-details-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.file-details-section h3 {
    color: #111827;
    font-size: 15px;
    margin-bottom: 12px;
}

.file-details-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.file-details-info-grid div {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 10px;
    min-width: 0;
}

.file-details-info-grid span {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.file-details-info-grid strong {
    display: block;
    color: #111827;
    font-size: 13px;
    font-weight: 900;
    word-break: break-word;
}

.file-details-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.file-details-tag {
    display: inline-flex;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
}

.file-details-muted {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
}

body.dark-mode .file-details-overlay {
    background: rgba(0, 0, 0, 0.58);
}

body.dark-mode .file-details-panel {
    background: #0f172a;
    border-left-color: #1f2937;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.48);
}

body.dark-mode .file-details-header {
    border-bottom-color: #1f2937;
}

body.dark-mode .file-details-kicker {
    color: #c7d2fe;
}

body.dark-mode .file-details-header h2,
body.dark-mode .file-details-section h3,
body.dark-mode .file-details-info-grid strong {
    color: #f9fafb;
}

body.dark-mode .file-details-close {
    background: #111827;
    border-color: #374151;
    color: #d1d5db;
}

body.dark-mode .file-details-close:hover {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fecaca;
}

body.dark-mode .file-details-loading,
body.dark-mode .file-details-section,
body.dark-mode .file-details-info-grid div {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .file-details-loading,
body.dark-mode .file-details-muted,
body.dark-mode .file-details-info-grid span {
    color: #9ca3af;
}

body.dark-mode .file-details-error {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fecaca;
}

body.dark-mode .file-details-main-icon,
body.dark-mode .file-details-tag {
    background: #1e1b4b;
    color: #c7d2fe;
}

@media (max-width: 760px) {
    .file-details-panel {
        width: 100%;
        height: 92vh;
        top: auto;
        bottom: 0;
        border-left: none;
        border-radius: 24px 24px 0 0;
        transform: translateY(105%);
    }

    .file-details-panel.show {
        transform: translateY(0);
    }

    .file-details-header,
    .file-details-body {
        padding: 18px;
    }

    .file-details-info-grid {
        grid-template-columns: 1fr;
    }
}

/* Step 48 - Settings tabs */

.settings-tabs-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
}

.settings-tabs-sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
    position: sticky;
    top: 100px;
}

.settings-tab-button {
    width: 100%;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 16px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    transition: 0.2s ease;
    font-family: inherit;
}

.settings-tab-button > span {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.settings-tab-button strong {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 3px;
}

.settings-tab-button small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
}

.settings-tab-button:hover,
.settings-tab-button.active {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.settings-tab-button:hover > span,
.settings-tab-button.active > span {
    background: #4f46e5;
    color: #ffffff;
}

.settings-tab-button.active strong {
    color: #4f46e5;
}

.settings-tabs-content {
    min-width: 0;
}

.settings-tab-form {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.settings-tab-panel {
    display: none;
    padding: 22px;
}

.settings-tab-panel.active {
    display: block;
}

.settings-panel-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.settings-panel-header h2 {
    color: #111827;
    font-size: 21px;
    margin-bottom: 5px;
}

.settings-panel-header p {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.settings-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.settings-choice-card {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 150px;
}

.settings-choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-choice-card:hover,
.settings-choice-card.selected {
    background: #eef2ff;
    border-color: #818cf8;
    box-shadow: 0 12px 28px rgba(79, 70, 229, 0.12);
    transform: translateY(-1px);
}

.settings-choice-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #ffffff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
}

.settings-choice-card strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.settings-choice-card small {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.settings-wide-field {
    max-width: 520px;
}

.settings-info-strip {
    margin-top: 16px;
    background: #f8faff;
    border: 1px solid #c7d2fe;
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.settings-info-strip span {
    font-size: 22px;
}

.settings-info-strip p {
    color: #4b5563;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.5;
}

.settings-privacy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.settings-privacy-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
}

.settings-privacy-card span {
    display: inline-flex;
    margin-bottom: 10px;
    font-size: 22px;
}

.settings-privacy-card strong {
    display: block;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    margin-bottom: 6px;
}

.settings-privacy-card p {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.settings-save-bar {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-save-bar strong {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 3px;
}

.settings-save-bar span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 750;
}

.settings-save-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.dark-mode .settings-tabs-sidebar,
body.dark-mode .settings-tab-form {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .settings-tab-button > span,
body.dark-mode .settings-choice-icon {
    background: #0f172a;
    color: #c7d2fe;
}

body.dark-mode .settings-tab-button strong,
body.dark-mode .settings-panel-header h2,
body.dark-mode .settings-choice-card strong,
body.dark-mode .settings-privacy-card strong,
body.dark-mode .settings-save-bar strong {
    color: #f9fafb;
}

body.dark-mode .settings-tab-button small,
body.dark-mode .settings-panel-header p,
body.dark-mode .settings-choice-card small,
body.dark-mode .settings-privacy-card p,
body.dark-mode .settings-save-bar span {
    color: #9ca3af;
}

body.dark-mode .settings-tab-button:hover,
body.dark-mode .settings-tab-button.active {
    background: #1e1b4b;
    border-color: #312e81;
}

body.dark-mode .settings-tab-button:hover > span,
body.dark-mode .settings-tab-button.active > span {
    background: #6366f1;
    color: #ffffff;
}

body.dark-mode .settings-tab-button.active strong {
    color: #c7d2fe;
}

body.dark-mode .settings-choice-card,
body.dark-mode .settings-privacy-card,
body.dark-mode .settings-save-bar {
    background: #0f172a;
    border-color: #374151;
}

body.dark-mode .settings-choice-card:hover,
body.dark-mode .settings-choice-card.selected {
    background: #1e1b4b;
    border-color: #6366f1;
}

body.dark-mode .settings-info-strip {
    background: #1e1b4b;
    border-color: #312e81;
}

body.dark-mode .settings-info-strip p {
    color: #c7d2fe;
}

@media (max-width: 1000px) {
    .settings-tabs-layout {
        grid-template-columns: 1fr;
    }

    .settings-tabs-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .settings-tabs-sidebar {
        grid-template-columns: 1fr;
    }

    .settings-tab-panel {
        padding: 18px;
    }

    .settings-option-grid,
    .settings-privacy-grid {
        grid-template-columns: 1fr;
    }

    .settings-save-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-save-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .settings-save-actions .btn {
        width: 100%;
    }
}

/* Step 49 - Admin tabs and security logs */

.admin-tabs-layout {
    align-items: flex-start;
}

.admin-tabs-content {
    min-width: 0;
}

.admin-tab-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.admin-security-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.security-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.security-log-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.security-log-card.severity-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.security-log-card.severity-danger {
    border-color: #fecaca;
    background: #fef2f2;
}

.security-log-card.severity-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.security-log-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 15px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.security-log-content {
    flex: 1;
    min-width: 0;
}

.security-log-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.security-log-type {
    display: inline-flex;
    width: fit-content;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 5px;
}

.security-log-top h3 {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.security-log-top time {
    color: #9ca3af;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.security-log-content p {
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 10px;
}

.security-log-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.security-log-meta span {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 5px 9px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 850;
}

.admin-section-block {
    margin-top: 24px;
}

body.dark-mode .admin-tab-panel,
body.dark-mode .security-log-card {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .security-log-card.severity-warning {
    background: #1f1a08;
    border-color: #854d0e;
}

body.dark-mode .security-log-card.severity-danger {
    background: #1f0b0b;
    border-color: #7f1d1d;
}

body.dark-mode .security-log-card.severity-success {
    background: #071c12;
    border-color: #14532d;
}

body.dark-mode .security-log-icon,
body.dark-mode .security-log-type {
    background: #1e1b4b;
    color: #c7d2fe;
}

body.dark-mode .security-log-top h3 {
    color: #f9fafb;
}

body.dark-mode .security-log-top time,
body.dark-mode .security-log-content p {
    color: #9ca3af;
}

body.dark-mode .security-log-meta span {
    background: #0f172a;
    border-color: #374151;
    color: #d1d5db;
}

@media (max-width: 1100px) {
    .admin-security-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .admin-tab-panel {
        padding: 18px;
        border-radius: 18px;
    }

    .security-log-card {
        flex-direction: column;
    }

    .security-log-top {
        flex-direction: column;
        gap: 8px;
    }

    .security-log-top time {
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .admin-security-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin user filter styling fix */

.admin-filter-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 18px;
    margin: 18px 0;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.04);
}

.admin-filter-search {
    margin-bottom: 14px;
}

.admin-filter-search label,
.admin-filter-grid label {
    display: block;
    color: #374151;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 7px;
}

.admin-search-input-wrap {
    position: relative;
}

.admin-search-input-wrap span {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    pointer-events: none;
}

.admin-search-input-wrap input {
    width: 100%;
    min-height: 46px;
    padding: 13px 14px 13px 44px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    color: #111827;
    font-size: 14px;
    font-weight: 750;
    outline: none;
    transition: 0.2s ease;
    font-family: inherit;
}

.admin-search-input-wrap input::placeholder {
    color: #9ca3af;
    font-weight: 700;
}

.admin-search-input-wrap input:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.admin-filter-grid select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    background: #f9fafb;
    color: #111827;
    padding: 0 13px;
    font-size: 14px;
    font-weight: 800;
    outline: none;
    font-family: inherit;
    transition: 0.2s ease;
}

.admin-filter-grid select:focus {
    border-color: #4f46e5;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.admin-filter-actions .btn {
    width: 100%;
    min-height: 46px;
}

.admin-filter-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-filter-footer span {
    color: #6b7280;
    font-size: 13px;
    font-weight: 850;
}

body.dark-mode .admin-filter-panel {
    background: #111827;
    border-color: #1f2937;
}

body.dark-mode .admin-filter-search label,
body.dark-mode .admin-filter-grid label {
    color: #d1d5db;
}

body.dark-mode .admin-search-input-wrap input,
body.dark-mode .admin-filter-grid select {
    background: #0f172a;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-mode .admin-search-input-wrap input::placeholder {
    color: #6b7280;
}

body.dark-mode .admin-search-input-wrap input:focus,
body.dark-mode .admin-filter-grid select:focus {
    border-color: #818cf8;
    background: #111827;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.16);
}

body.dark-mode .admin-filter-footer {
    border-top-color: #1f2937;
}

body.dark-mode .admin-filter-footer span {
    color: #9ca3af;
}

@media (max-width: 1000px) {
    .admin-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .admin-filter-panel {
        border-radius: 18px;
        padding: 15px;
    }

    .admin-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-filter-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filter-footer .btn {
        width: 100%;
    }
}
