:root {
    --bg-white: rgba(255, 255, 255, 0.7);
    --bg-strong: rgba(255, 255, 255, 0.82);
    --bg-soft: rgba(255, 255, 255, 0.55);
    --border-light: rgba(255, 255, 255, 0.2);
    --border-strong: rgba(255, 255, 255, 0.42);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --brand-start: #5b6bf9;
    --brand-end: #7b4fe0;
    --brand-deep: #4c51bf;
    --shadow-soft: 0 20px 60px rgba(91, 107, 249, 0.12);
    --shadow-hover: 0 24px 70px rgba(91, 107, 249, 0.18);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --transition-base: 0.28s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    font-family: "Manrope", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--text-primary);
    background: #eef3fb;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    border: none;
    cursor: pointer;
}

.page-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.background-layer,
.background-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.background-layer {
    background:
        linear-gradient(180deg, rgba(245, 249, 255, 0.1), rgba(241, 245, 255, 0.24)),
        url("./11311.png") center center / cover no-repeat;
    filter: blur(3px);
    transform: scale(1.04);
}

.background-overlay {
    background:
        radial-gradient(circle at top left, rgba(123, 79, 224, 0.18), transparent 38%),
        radial-gradient(circle at top right, rgba(91, 107, 249, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(247, 250, 255, 0.72), rgba(239, 244, 252, 0.84));
}

.page-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 20px 48px;
    display: grid;
    gap: 24px;
    width: min(100%, 1200px);
    min-width: 0;
}

.glass-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    padding: 38px 24px 34px;
    text-align: center;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(91, 107, 249, 0.2), rgba(123, 79, 224, 0.13)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 65%);
    z-index: -1;
}

.hero-badge,
.section-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--brand-deep);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-logo {
    width: 136px;
    height: 136px;
    margin: 22px auto 20px;
    border-radius: 50%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow: 0 18px 34px rgba(76, 81, 191, 0.16);
    overflow: hidden;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 50%;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    margin-top: 12px;
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.content-grid {
    display: block;
}

.files-stage,
.admin-anchor {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.files-header,
.tabs-panel,
.list-panel,
.login-section,
.admin-section,
.footer {
    border-radius: var(--radius-xl);
    width: 100%;
    min-width: 0;
}

.files-header,
.tabs-panel,
.login-section,
.admin-section,
.footer {
    padding: 24px;
}

.list-panel {
    padding: 12px;
}

.section-heading {
    display: grid;
    gap: 10px;
}

.section-heading.compact {
    gap: 8px;
}

.section-heading h2 {
    font-size: clamp(1.5rem, 3vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.files-header .section-heading h2 {
    font-size: clamp(1.34rem, 2.6vw, 2rem);
}

.login-section .section-heading h2 {
    font-size: clamp(1.26rem, 2.3vw, 1.82rem);
}

.section-heading p,
.tabs-note,
.detail-card p,
.footer p,
.hint {
    color: var(--text-secondary);
    line-height: 1.7;
}

.files-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
}

.tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    min-width: 0;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.search-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(123, 79, 224, 0.08)),
        rgba(255, 255, 255, 0.24);
    color: var(--text-primary);
    padding: 14px 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 10px 22px rgba(91, 107, 249, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.search-input::placeholder {
    color: rgba(93, 104, 134, 0.82);
}

.search-input:focus {
    outline: none;
    border-color: rgba(91, 107, 249, 0.62);
    box-shadow:
        0 0 0 4px rgba(91, 107, 249, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 12px 24px rgba(91, 107, 249, 0.12);
}

.tabs-heading {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.tabs-title {
    font-size: clamp(1.22rem, 2vw, 1.42rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.tabs-tip {
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
}

#searchBtn {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 999px;
    color: #5441b5;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(123, 79, 224, 0.18)),
        linear-gradient(135deg, rgba(91, 107, 249, 0.14), rgba(123, 79, 224, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.58);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.75),
        0 12px 24px rgba(91, 107, 249, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#searchBtn:hover,
#searchBtn:focus-visible {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(123, 79, 224, 0.24)),
        linear-gradient(135deg, rgba(91, 107, 249, 0.18), rgba(123, 79, 224, 0.18));
    color: #4838a8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 16px 28px rgba(91, 107, 249, 0.16);
}

.category-tabs {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    width: 100%;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn,
.btn,
.file-link,
.category-title,
.sub-category-title,
.close-btn,
.file-item,
.detail-card,
.mini-pill,
.mini-btn,
.mini-input {
    transition:
        transform var(--transition-base),
        box-shadow var(--transition-base),
        border-color var(--transition-base),
        background var(--transition-base),
        color var(--transition-base),
        opacity var(--transition-base);
}

.tab-btn {
    white-space: nowrap;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: var(--text-primary);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    flex: 0 0 auto;
}

.tab-btn:hover,
.tab-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(91, 107, 249, 0.14);
    border-color: rgba(91, 107, 249, 0.3);
}

.tab-btn:active {
    transform: scale(0.98);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 18px 34px rgba(91, 107, 249, 0.24);
}

.file-list {
    display: grid;
    gap: 18px;
}

.category-group,
.sub-category-group {
    display: grid;
    gap: 14px;
    width: 100%;
    min-width: 0;
}

.category-title,
.sub-category-title {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 22px;
    background: var(--bg-strong);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: 0 10px 30px rgba(91, 107, 249, 0.08);
}

.category-title::before,
.sub-category-title::before {
    content: "";
    width: 4px;
    align-self: stretch;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand-start), var(--brand-end));
    box-shadow: 0 0 18px rgba(91, 107, 249, 0.3);
}

.category-title > span:first-child,
.sub-category-title > span:first-child {
    flex: 1;
    min-width: 0;
    font-weight: 800;
    font-size: 1.18rem;
    text-align: left;
    word-break: break-word;
}

.sub-category-group {
    margin-left: 18px;
}

.sub-category-title > span:first-child {
    font-size: 1rem;
    font-weight: 700;
}

.category-title:hover,
.sub-category-title:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(91, 107, 249, 0.12);
}

.category-title:active,
.sub-category-title:active {
    transform: scale(0.995);
}

.toggle-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--brand-deep);
    background: rgba(91, 107, 249, 0.1);
    font-size: 0.95rem;
}

.category-title .toggle-icon {
    background: linear-gradient(135deg, rgba(116, 130, 250, 0.28), rgba(146, 120, 233, 0.24));
    color: #6674e8;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.category-title.collapsed .toggle-icon,
.sub-category-title.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.category-content,
.sub-category-content {
    display: grid;
    gap: 14px;
    overflow: hidden;
    transition:
        max-height 0.12s cubic-bezier(0.25, 0.9, 0.3, 1),
        opacity 0.1s linear;
    opacity: 1;
    will-change: max-height, opacity;
    contain: layout paint;
    transform: translateZ(0);
}

.category-content.collapsed,
.sub-category-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

.file-item {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 14px 30px rgba(91, 107, 249, 0.08);
    width: 100%;
    min-width: 0;
    will-change: transform, box-shadow;
}

.file-card-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-start;
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(91, 107, 249, 0.13);
}

.file-name {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.6;
    word-break: break-word;
}

.file-info {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.file-info-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.file-extra-note {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(91, 107, 249, 0.1);
    color: var(--brand-deep);
    font-size: 0.78rem;
    font-weight: 700;
}

.file-link,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 16px;
    padding: 13px 20px;
    font-weight: 700;
    text-decoration: none;
}

.btn-primary,
.file-link {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    box-shadow: 0 18px 30px rgba(91, 107, 249, 0.22);
}

.btn-secondary {
    color: var(--brand-deep);
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(91, 107, 249, 0.16);
}

.btn-danger,
.btn-file-danger {
    color: #fff;
    background: linear-gradient(135deg, #f56565, #e53e3e);
    box-shadow: none;
}

.btn:hover,
.file-link:hover,
.btn-file-action:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-hover);
}

.btn:active,
.file-link:active,
.btn-file-action:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.btn-file-action {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(91, 107, 249, 0.12);
    color: var(--brand-deep);
    font-weight: 700;
    will-change: transform, box-shadow;
}

.btn-file-danger {
    box-shadow: none;
}

.mini-input,
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.66);
    color: var(--text-primary);
    padding: 14px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: #9aa6b2;
}

.form-group input:focus,
.form-group select:focus,
.mini-input:focus {
    outline: none;
    border-color: rgba(91, 107, 249, 0.62);
    box-shadow:
        0 0 0 4px rgba(91, 107, 249, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.login-form,
.upload-form {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.48);
    width: 100%;
    min-width: 0;
}

.upload-form h3 {
    font-size: 1.15rem;
    font-weight: 800;
}

.form-group {
    display: grid;
    gap: 10px;
}

.form-group label {
    font-weight: 700;
}

.sub-category-container,
.inline-group,
.admin-header,
.admin-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sub-category-container > * {
    flex: 1 1 220px;
}

.inline-group > input,
.inline-group > select {
    flex: 1 1 220px;
}

.inline-group > button {
    flex: 0 0 auto;
}

.admin-header {
    align-items: end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-buttons {
    justify-content: flex-end;
    margin-bottom: 20px;
}

.status-message {
    display: none;
    padding: 12px 14px;
    border-radius: 16px;
    font-weight: 700;
    line-height: 1.6;
}

.status-message.success {
    display: block;
    color: #22543d;
    background: rgba(198, 246, 213, 0.9);
    border: 1px solid rgba(72, 187, 120, 0.24);
}

.status-message.error {
    display: block;
    color: #742a2a;
    background: rgba(254, 215, 215, 0.9);
    border: 1px solid rgba(245, 101, 101, 0.24);
}

.loading {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.footer {
    text-align: center;
}

.download-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    width: min(360px, calc(100vw - 28px));
    padding: 16px 18px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(123, 79, 224, 0.14)),
        rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.56);
    box-shadow: 0 18px 40px rgba(91, 107, 249, 0.16);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition:
        opacity 0.24s ease,
        transform 0.24s ease;
}

.download-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.download-toast.error {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(245, 101, 101, 0.14)),
        rgba(255, 255, 255, 0.76);
}

.download-toast-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-primary);
}

.download-toast-message {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
}

.download-progress-track {
    margin-top: 12px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 3px rgba(91, 107, 249, 0.1);
}

.download-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
    box-shadow: 0 4px 14px rgba(91, 107, 249, 0.26);
    transition: width 0.2s ease;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30;
    padding: 24px;
    background: rgba(224, 230, 243, 0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal.show {
    display: grid;
    place-items: center;
}

.modal-content {
    width: min(760px, 100%);
    max-height: min(88vh, 920px);
    max-width: 100%;
    overflow: hidden;
    border-radius: 30px;
}

.modal-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 18px;
}

.modal-header h2 {
    margin-top: 10px;
    font-size: 1.6rem;
    font-weight: 800;
}

.close-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    color: var(--brand-deep);
    font-size: 1.8rem;
    line-height: 1;
}

.modal-body {
    padding: 0 24px 24px;
    max-height: calc(88vh - 96px);
    overflow-y: auto;
    display: grid;
    gap: 18px;
}

.modal-actions,
.search-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.move-modal-content,
.search-modal-content {
    width: min(860px, 100%);
}

.search-summary-card,
.search-result-card {
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(123, 79, 224, 0.14)),
        rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 16px 34px rgba(91, 107, 249, 0.1);
}

.search-summary-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.search-summary-title {
    font-size: 1.08rem;
    font-weight: 800;
}

.search-summary-subtitle,
.search-page-info {
    color: var(--text-secondary);
}

.search-result-list {
    display: grid;
    gap: 14px;
}

.search-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.search-result-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(91, 107, 249, 0.22), rgba(123, 79, 224, 0.22));
    color: var(--brand-deep);
    font-weight: 800;
}

.search-result-source {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.52);
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.manage-section {
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.48);
}

.manage-section h3 {
    margin-bottom: 14px;
    font-size: 1.08rem;
    font-weight: 800;
}

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

.category-order-list {
    display: grid;
    gap: 12px;
}

.order-card,
.order-sub-card {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow: 0 12px 24px rgba(91, 107, 249, 0.08);
    transition:
        transform 0.16s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.16s ease,
        opacity 0.16s ease;
    will-change: transform, box-shadow;
}

.order-card {
    padding: 14px 16px;
}

.order-card:hover,
.order-sub-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(91, 107, 249, 0.12);
}

.order-sub-list {
    display: grid;
    gap: 10px;
    margin: -2px 0 4px 22px;
    animation: fadeSlideIn 0.18s ease;
}

.order-sub-card {
    padding: 10px 12px;
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.order-row-sub {
    min-height: 44px;
}

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

.order-row-title {
    font-weight: 800;
    color: var(--text-primary);
    word-break: break-word;
}

.order-toggle-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
    color: var(--brand-deep);
    flex-shrink: 0;
}

.order-toggle-btn:disabled {
    opacity: 0.72;
    cursor: default;
}

.order-toggle-icon {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.order-toggle-icon-empty {
    font-size: 0.92rem;
}

.order-controls {
    display: inline-flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.order-arrow-btn {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(123, 79, 224, 0.18)),
        rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.58);
    color: #5b57d8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 10px 18px rgba(91, 107, 249, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.86rem;
}

.order-arrow-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
}

.order-card.is-moving-up,
.order-sub-card.is-moving-up {
    animation: orderMoveUp 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.order-card.is-moving-down,
.order-sub-card.is-moving-down {
    animation: orderMoveDown 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes orderMoveUp {
    0% {
        transform: translateY(8px);
        opacity: 0.92;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes orderMoveDown {
    0% {
        transform: translateY(-8px);
        opacity: 0.92;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.warning {
    color: #c53030;
    font-weight: 700;
}

:focus-visible {
    outline: 2px solid rgba(91, 107, 249, 0.42);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    html,
    body,
    .page-shell,
    .page-content,
    .content-grid,
    .files-stage,
    .admin-anchor,
    .files-header,
    .tabs-panel,
    .list-panel,
    .login-section,
    .admin-section,
    .footer,
    .login-form,
    .upload-form,
    .category-group,
    .sub-category-group,
    .file-item,
    .category-title,
    .sub-category-title,
    .modal-content,
    .manage-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .page-content {
        padding: 18px 14px 28px;
        gap: 16px;
        width: 100%;
    }

    .hero,
    .files-header,
    .tabs-panel,
    .login-section,
    .admin-section,
    .footer {
        padding: 18px;
        border-radius: 24px;
    }

    .list-panel {
        padding: 8px;
        border-radius: 24px;
    }

    .hero-logo {
        width: 104px;
        height: 104px;
        margin: 18px auto 16px;
    }

    .hero-badge,
    .section-tag {
        max-width: 100%;
        font-size: 0.74rem;
        letter-spacing: 0.05em;
        white-space: normal;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .section-heading h2 {
        font-size: clamp(1.45rem, 7vw, 2rem);
    }

    .files-header,
    .tabs-header,
    .admin-header,
    .admin-buttons {
        align-items: stretch;
        justify-content: flex-start;
        flex-direction: column;
    }

    .header-actions,
    .admin-buttons {
        width: 100%;
    }

    .tabs-header {
        margin-bottom: 12px;
    }

    .search-bar,
    .search-summary-card {
        grid-template-columns: 1fr;
    }

    .tabs-tip {
        font-size: 0.84rem;
    }

    #searchBtn {
        min-height: 46px;
        width: 100%;
    }

    .header-actions .btn,
    .admin-buttons .btn,
    .login-form .btn,
    .upload-form .btn,
    .inline-group .btn {
        width: 100%;
    }

    .btn,
    .file-link {
        padding: 12px 16px;
    }

    .tab-btn {
        padding: 11px 16px;
        font-size: 0.96rem;
    }

    .category-title > span:first-child,
    .sub-category-title > span:first-child,
    .file-name,
    .file-info,
    .hero-subtitle,
    .tabs-title,
    .hint,
    .footer p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .category-title,
    .sub-category-title,
    .file-item,
    .login-form,
    .upload-form,
    .manage-section {
        border-radius: 20px;
    }

    .sub-category-group {
        margin-left: 0;
    }

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

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

    .sort-section-header {
        flex-direction: column;
    }

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

    .modal-actions,
    .search-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .search-result-head {
        align-items: flex-start;
    }

    .modal {
        padding: 14px;
    }

    .download-toast {
        right: 14px;
        left: 14px;
        bottom: 14px;
        width: auto;
    }

    .modal-content {
        border-radius: 24px;
    }

    .modal-header,
    .modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .background-layer {
        background-position: center top;
        background-size: cover;
        transform: none;
    }
}

@media (max-width: 480px) {
    :root {
        --radius-xl: 24px;
        --radius-lg: 18px;
    }

    .page-content {
        padding:
            12px
            10px
            22px;
        gap: 12px;
    }

    .hero,
    .files-header,
    .tabs-panel,
    .login-section,
    .admin-section,
    .footer {
        padding: 16px 14px;
        border-radius: 20px;
    }

    .list-panel,
    .login-form,
    .upload-form,
    .manage-section,
    .modal-content {
        border-radius: 18px;
    }

    .hero {
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .hero-logo {
        width: 88px;
        height: 88px;
        margin: 14px auto 14px;
        padding: 8px;
    }

    .hero-badge,
    .section-tag {
        padding: 7px 12px;
        font-size: 0.68rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 10vw, 2.2rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        margin-top: 10px;
        font-size: 0.92rem;
    }

    .section-heading h2 {
        font-size: 1.9rem;
    }

    .files-header,
    .tabs-header,
    .admin-header {
        gap: 12px;
    }

    .tabs-panel {
        padding-bottom: 14px;
    }

    .tabs-title {
        font-size: 1rem;
    }

    .tabs-tip {
        font-size: 0.8rem;
    }

    .category-tabs {
        gap: 10px;
        padding-inline: 2px;
    }

    .search-input {
        padding: 13px 16px;
        font-size: 16px;
    }

    #searchBtn {
        min-height: 44px;
        padding: 11px 16px;
        font-size: 0.92rem;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 0.92rem;
    }

    .category-title,
    .sub-category-title {
        padding: 14px 14px;
        gap: 10px;
        border-radius: 18px;
    }

    .category-title > span:first-child,
    .sub-category-title > span:first-child {
        font-size: 1rem;
    }

    .toggle-icon {
        width: 24px;
        height: 24px;
        font-size: 0.82rem;
    }

    .file-item {
        padding: 16px 14px;
    }

    .file-name {
        font-size: 1rem;
        line-height: 1.5;
    }

    .file-info {
        font-size: 0.88rem;
    }

    .btn,
    .file-link,
    .btn-file-action {
        font-size: 0.94rem;
    }

    .sub-category-container,
    .inline-group {
        flex-direction: column;
    }

    .sub-category-container > *,
    .inline-group > input,
    .inline-group > select,
    .inline-group > button {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
    }

    .form-group input[type="password"],
    .form-group input[type="text"],
    .form-group input[type="file"],
    .form-group select {
        padding: 13px 14px;
        font-size: 16px;
    }

    .modal {
        padding: 10px;
    }

    .modal-header {
        padding: 16px 16px 12px;
    }

    .modal-body {
        padding: 0 16px 16px;
    }

    .close-btn {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 2000px) {
    .page-content {
        max-width: 1440px;
        padding-top: 44px;
        padding-bottom: 60px;
    }

    .hero {
        padding-top: 56px;
        padding-bottom: 52px;
    }

    .hero-logo {
        width: 152px;
        height: 152px;
    }

    .section-heading h2 {
        font-size: 2.7rem;
    }

    .file-name {
        font-size: 1.15rem;
    }
}
