* {
    box-sizing: border-box;
}

:root {
    --ink: #182230;
    --muted: #7d8794;
    --subtle: #a0a9b4;
    --line: #e8edf2;
    --accent: #1976d2;
    --danger: #ef5b68;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.page {
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 0 0 28px;
    background: #fff;
}

.file-box {
    width: 100%;
    background: #fff;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.nav-shell {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: #243142;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.brand-logo {
    display: grid;
    width: 42px;
    height: 42px;
    flex: none;
    place-items: center;
}

.brand-logo img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-nav a {
    display: inline-flex;
    min-height: 68px;
    align-items: center;
    border-bottom: 2px solid transparent;
    color: #677383;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.site-nav a.active {
    border-bottom-color: var(--accent);
    color: var(--accent);
}

.site-nav a:hover {
    color: var(--accent);
}

.site-main {
    background: #fff;
    padding-top: 18px;
}

.path-bar {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.crumbs {
    display: flex;
    min-width: 0;
    align-items: center;
    overflow: hidden;
}

.crumbs a,
.crumbs span {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.crumbs a {
    color: var(--accent);
    font-weight: 600;
}

.crumbs .current {
    min-width: 0;
    overflow: hidden;
    color: #626d79;
    font-weight: 600;
    text-overflow: ellipsis;
}

.sep {
    padding: 0 9px;
    color: #c4ccd5;
}

.toolbar {
    display: flex;
    min-height: 42px;
    align-items: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.file-count {
    color: var(--subtle);
    font-size: 13px;
    font-weight: 600;
}

.file-summary {
    margin-top: 14px;
    border-top: 0;
    padding: 0 14px 10px;
}

.list {
    min-height: 0;
    overflow: visible;
    background: #fff;
}

.folder-row {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    color: #425267;
    font-size: 14px;
    font-weight: 700;
}

.category-section {
    background: #fff;
}

.folder-toggle {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.folder-toggle::-webkit-details-marker {
    display: none;
}

.folder-title {
    min-width: 0;
    overflow: hidden;
    color: var(--accent);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-caret {
    width: 8px;
    height: 8px;
    flex: none;
    border-right: 1.8px solid #9aa6b4;
    border-bottom: 1.8px solid #9aa6b4;
    transform: rotate(45deg);
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.category-section[open] .folder-caret {
    transform: rotate(225deg);
}

.folder-toggle:hover .folder-caret {
    border-color: var(--accent);
}

.folder-row a {
    color: var(--accent);
}

.folder-row a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.file-row {
    display: grid;
    min-height: 62px;
    grid-template-columns: 38px minmax(220px, 1fr) 102px 88px 90px;
    align-items: center;
    column-gap: 18px;
    padding: 0 14px;
    border-bottom: 1px dashed var(--line);
    background: #fff;
    transition: background-color 0.15s ease;
}

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

.file-icon {
    display: grid;
    width: 34px;
    height: 30px;
    place-items: center;
    border-radius: 5px;
    color: #fff;
    background: var(--danger);
}

.file-icon-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-icon[data-file-type="pdf"] {
    background: #ef5368;
}

.file-icon[data-file-type="excel"] {
    background: #1f9d55;
}

.file-icon[data-file-type="word"] {
    background: #2f76d2;
}

.file-icon[data-file-type="ppt"] {
    background: #e46a36;
}

.file-icon[data-file-type="archive"] {
    background: #7d5bd9;
}

.file-icon[data-file-type="file"] {
    background: #8290a0;
}

.file-name {
    min-width: 0;
    overflow: hidden;
    color: #233044;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name:hover {
    color: var(--accent);
}

.file-size,
.file-time {
    overflow: hidden;
    color: #8290a0;
    font-size: 13px;
    justify-self: end;
    text-overflow: ellipsis;
    text-align: right;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-self: end;
    color: var(--accent);
}

.icon-btn {
    display: inline-grid;
    width: 24px;
    height: 24px;
    padding: 0;
    place-items: center;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
}

.icon-btn:hover {
    color: #075cae;
}

.icon-btn.is-copied {
    color: #1f9d55;
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.copy-toast {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1000;
    min-width: 120px;
    max-width: calc(100% - 32px);
    padding: 9px 18px;
    border-radius: 4px;
    color: #fff;
    background: rgba(24, 34, 48, 0.92);
    box-shadow: 0 8px 24px rgba(24, 34, 48, 0.18);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.copy-toast.is-error {
    background: rgba(199, 47, 64, 0.94);
}

.empty-tip {
    padding: 42px 20px;
    color: var(--muted);
    text-align: center;
}

.site-footer {
    margin-top: 48px;
    background: #fff;
}

.footer-inner {
    display: flex;
    min-height: 168px;
    align-items: center;
    justify-content: center;
    padding: 24px 0 18px;
}

.footer-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 46px;
}

.footer-qr-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #66758a;
    font-size: 13px;
    font-weight: 650;
}

.footer-qr-card img {
    width: 112px;
    height: 112px;
    padding: 4px;
    border: 1px solid #e1e8f0;
    border-radius: 4px;
    object-fit: cover;
    background: #fff;
}

@media (max-width: 900px) {
    .page {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .nav-shell {
        min-height: 60px;
        gap: 14px;
    }

    .site-brand {
        font-size: 16px;
    }

    .brand-logo,
    .brand-logo img {
        width: 38px;
        height: 38px;
    }

    .site-nav {
        gap: 18px;
    }

    .site-nav a {
        min-height: 60px;
        font-size: 13px;
    }

    .site-main {
        padding-top: 12px;
    }

    .path-bar {
        min-height: 50px;
        padding: 0;
    }

    .file-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-areas:
            "icon name actions"
            "icon meta time";
        gap: 0 8px;
        padding: 8px 10px;
    }

    .file-icon {
        grid-area: icon;
    }

    .file-name {
        grid-area: name;
        align-self: end;
        font-size: 14px;
    }

    .file-size {
        grid-area: meta;
        align-self: start;
        font-size: 12px;
    }

    .file-time {
        display: block;
        grid-area: time;
        max-width: 140px;
        align-self: start;
        font-size: 11px;
        text-align: right;
    }

    .file-actions {
        grid-area: actions;
        gap: 8px;
        align-self: center;
    }

    .icon-btn {
        width: 28px;
        height: 28px;
    }

    .footer-inner {
        min-height: 156px;
        padding-top: 20px;
    }

    .footer-qr {
        width: 100%;
        gap: 28px;
    }

    .file-summary {
        padding: 0 0 10px;
    }
}

@media (max-width: 480px) {
    .page {
        width: 100%;
        padding-right: 10px;
        padding-left: 10px;
    }

    .nav-shell {
        gap: 10px;
    }

    .site-brand {
        font-size: 15px;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav a {
        font-size: 12px;
    }

    .folder-row {
        min-height: 44px;
        padding: 0 10px;
    }

    .footer-qr {
        justify-content: space-between;
        gap: 8px;
    }

    .footer-qr-card {
        gap: 6px;
    }

    .footer-qr-card img {
        width: 96px;
        height: 96px;
    }
}
