﻿:root {
    --cw-blue: #1268e8;
    --cw-blue-dark: #0b4fb8;
    --cw-blue-soft: #eaf3ff;
    --cw-cyan: #18b8d9;
    --cw-ink: #172a46;
    --cw-text: #435570;
    --cw-muted: #7c8da5;
    --cw-line: #e4ebf5;
    --cw-bg: #f3f7fc;
    --cw-white: #fff;
    --cw-shadow: 0 16px 45px rgba(38, 73, 117, .09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.cw-page {
    margin: 0;
    min-width: 320px;
    background: var(--cw-bg);
    color: var(--cw-text);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.cw-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    height: 72px;
    border-bottom: 1px solid rgba(224, 233, 246, .9);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 5px 24px rgba(31, 66, 111, .045);
}

.cw-topbar-inner {
    width: calc(100% - 48px);
    max-width: 1500px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.cw-brand {
    min-width: 235px;
    display: inline-flex;
    align-items: center;
    color: var(--cw-ink);
    text-decoration: none;
}

.cw-brand:hover,
.cw-brand:focus {
    color: var(--cw-ink);
    text-decoration: none;
}

.cw-brand-mark {
    width: 46px;
    height: 46px;
    margin-right: 11px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #2786f3, #0f60db);
    box-shadow: 0 10px 22px rgba(18, 104, 232, .22);
    color: #fff;
    font-size: 24px;
}

.cw-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cw-brand-copy strong {
    color: var(--cw-ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .5px;
}

.cw-brand-copy small {
    margin-top: 3px;
    color: #72849e;
    font-size: 11px;
    letter-spacing: 2px;
}

.cw-main-nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.cw-main-nav a {
    position: relative;
    height: 100%;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    color: #42536d;
    font-weight: 600;
    text-decoration: none;
}

.cw-main-nav a:hover,
.cw-main-nav a.is-active {
    color: var(--cw-blue);
    text-decoration: none;
}

.cw-main-nav a.is-active:after {
    position: absolute;
    right: 17px;
    bottom: 0;
    left: 17px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--cw-blue);
    content: "";
}

.cw-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.cw-account-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cw-blue-soft);
    color: var(--cw-blue);
    font-size: 16px;
}

.cw-account-name {
    max-width: 100px;
    margin-left: 8px;
    overflow: hidden;
    color: #31435d;
    font-weight: 600;
    text-overflow: ellipsis;
}

.cw-logout {
    height: 34px;
    margin-left: 10px;
    padding: 0 11px;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fff;
    color: #61738d;
    cursor: pointer;
}

.cw-logout i {
    margin-right: 4px;
}

.cw-logout:hover {
    border-color: #8eb9ef;
    background: #f3f8ff;
    color: var(--cw-blue);
}

.cw-logout:disabled {
    cursor: wait;
    opacity: .55;
}

.cw-main {
    width: calc(100% - 48px);
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px 0 36px;
}

.cw-overview {
    min-height: 138px;
    padding: 24px 30px;
    border: 1px solid rgba(210, 225, 244, .9);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    background:
        radial-gradient(circle at 84% 18%, rgba(74, 163, 255, .18), transparent 28%),
        radial-gradient(circle at 64% 120%, rgba(24, 184, 217, .13), transparent 34%),
        linear-gradient(120deg, #fff 0%, #f8fbff 52%, #edf6ff 100%);
    box-shadow: var(--cw-shadow);
}

.cw-overview-copy {
    max-width: 560px;
}

.cw-eyebrow,
.cw-section-kicker {
    color: var(--cw-blue);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.6px;
}

.cw-overview h1 {
    margin: 8px 0 0;
    color: var(--cw-ink);
    font-size: 34px;
    font-weight: 750;
    letter-spacing: 1px;
}

.cw-overview p {
    margin: 0;
    color: #687c98;
    font-size: 15px;
    line-height: 1.75;
}

.cw-stats {
    min-width: 520px;
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 12px;
}

.cw-stat {
    min-height: 82px;
    padding: 14px 16px;
    border: 1px solid rgba(218, 230, 245, .95);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 9px 24px rgba(41, 84, 137, .06);
}

.cw-stat span {
    color: #7b8ca4;
    font-size: 12px;
}

.cw-stat strong {
    margin-top: 4px;
    color: var(--cw-blue);
    font-size: 27px;
    font-weight: 750;
}

.cw-stat-muted strong {
    color: #72849e;
}

.cw-workspace {
    margin-top: 18px;
    border: 1px solid var(--cw-line);
    border-radius: 18px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--cw-shadow);
}

.cw-group-panel {
    width: 265px;
    min-width: 265px;
    padding: 22px 16px;
    border-right: 1px solid var(--cw-line);
    background: #fafdff;
}

.cw-group-heading {
    padding: 0 8px 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.cw-group-heading span {
    color: #91a0b3;
    font-size: 11px;
}

.cw-group-heading h2 {
    margin: 4px 0 0;
    color: var(--cw-ink);
    font-size: 18px;
}

.cw-group-heading .cw-group-total {
    min-width: 28px;
    height: 25px;
    padding: 0 8px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--cw-blue-soft);
    color: var(--cw-blue);
    font-size: 12px;
    font-weight: 700;
}

.cw-group-search {
    height: 38px;
    margin: 0 6px 12px;
    padding: 0 11px;
    border: 1px solid #dfe8f3;
    border-radius: 9px;
    display: flex;
    align-items: center;
    background: #fff;
}

.cw-group-search i {
    color: #91a0b4;
}

.cw-group-search input {
    min-width: 0;
    flex: 1;
    height: 100%;
    padding: 0 8px;
    border: 0;
    outline: 0;
    background: transparent;
}

.cw-group-list {
    max-height: 620px;
    margin: 0;
    padding: 0 5px 10px;
    overflow: auto;
    list-style: none;
}

.cw-group-list li {
    margin: 2px 0;
}

.cw-group-list button {
    width: 100%;
    min-height: 43px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    display: flex;
    align-items: center;
    background: transparent;
    color: #4c5f78;
    text-align: left;
    cursor: pointer;
}

.cw-group-list button:hover,
.cw-group-list button.is-active {
    background: #eaf3ff;
    color: var(--cw-blue);
}

.cw-group-list button > i {
    width: 22px;
    color: #77a9e8;
    text-align: center;
}

.cw-group-list button > span {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-group-list button > em {
    margin-left: 7px;
    color: #8e9cb0;
    font-size: 11px;
    font-style: normal;
}

.cw-group-loading,
.cw-group-empty {
    padding: 30px 8px;
    color: #8c9bb0;
    text-align: center;
}

.cw-results-panel {
    min-width: 0;
    flex: 1;
    padding: 22px 24px 24px;
}

.cw-content-search {
    width: 100%;
    height: 46px;
    margin-top: 16px;
    border: 1px solid #dbe6f3;
    border-radius: 11px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #f8fbff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.cw-content-search:focus-within {
    border-color: #80b2ef;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(18, 104, 232, .08);
}

.cw-content-search > i {
    margin-left: 15px;
    color: #8498b2;
}

.cw-content-search input {
    min-width: 0;
    height: 100%;
    flex: 1;
    padding: 0 12px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--cw-ink);
}

.cw-content-search input::placeholder {
    color: #9aa9bc;
}

.cw-content-search button {
    align-self: stretch;
    min-width: 82px;
    border: 0;
    background: linear-gradient(135deg, #1975ee, #0c5fd8);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cw-result-head {
    padding-bottom: 17px;
    border-bottom: 1px solid #e9eff7;
}

.cw-breadcrumb {
    min-height: 20px;
    color: #7e8fa6;
    font-size: 12px;
}

.cw-breadcrumb span,
.cw-breadcrumb button {
    border: 0;
    background: transparent;
    color: #73869f;
}

.cw-breadcrumb button {
    padding: 0;
    cursor: pointer;
}

.cw-breadcrumb i {
    margin: 0 8px;
    color: #b0bdcd;
}

.cw-result-title-row {
    margin-top: 8px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.cw-result-title-row h2 {
    margin: 0;
    color: var(--cw-ink);
    font-size: 22px;
}

.cw-result-title-row p {
    margin: 6px 0 0;
    color: #7e8fa5;
    font-size: 12px;
}

.cw-result-title-row p strong {
    color: var(--cw-blue);
    font-size: 15px;
}

#cw-result-status {
    margin-left: 8px;
    color: #9aa7b8;
}

.cw-mobile-groups {
    display: none;
}

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

.cw-folder-back {
    height: 36px;
    padding: 0 13px;
    border: 1px solid #d7e3f1;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f7faff;
    color: #49617f;
    font-weight: 600;
    cursor: pointer;
}

.cw-folder-back i {
    margin-right: 6px;
}

.cw-folder-back:hover:not(:disabled) {
    border-color: #8bb7ed;
    background: #edf5ff;
    color: var(--cw-blue);
}

.cw-folder-back:disabled {
    color: #a4b0c0;
    background: #f5f7fa;
    cursor: default;
    opacity: .72;
}

.cw-filters {
    padding: 16px 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(125px, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

.cw-filters label {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cw-filters label > span {
    margin: 0 0 6px 2px;
    color: #8493a7;
    font-size: 11px;
}

.cw-filters select {
    width: 100%;
    height: 40px;
    padding: 0 31px 0 11px;
    border: 1px solid #dfe7f2;
    border-radius: 9px;
    outline: 0;
    background: #fff;
    color: #42546d;
}

.cw-filters select:focus {
    border-color: #86b7ef;
    box-shadow: 0 0 0 3px rgba(18, 104, 232, .07);
}

.cw-reset {
    height: 40px;
    padding: 0 15px;
    border: 1px solid #dce6f2;
    border-radius: 9px;
    background: #f8fbff;
    color: #5f718a;
    white-space: nowrap;
    cursor: pointer;
}

.cw-reset i {
    margin-right: 5px;
}

.cw-reset:hover {
    border-color: #9ec3ee;
    color: var(--cw-blue);
}

.cw-table-wrap {
    overflow-x: auto;
    border: 1px solid #e3eaf4;
    border-radius: 12px;
}

.cw-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
}

.cw-col-name { width: 51%; }
.cw-col-operation { width: 12%; }
.cw-col-date { width: 14%; }
.cw-col-size { width: 10%; }
.cw-col-type { width: 13%; }

.cw-table th {
    height: 46px;
    padding: 0 13px;
    background: #f6f9fd;
    color: #718198;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
}

.cw-table td {
    height: 70px;
    padding: 10px 13px;
    border-top: 1px solid #edf1f7;
    color: #3d5069;
    font-size: 12px;
    vertical-align: middle;
}

.cw-table tbody tr:hover td {
    background: #fbfdff;
}

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

.cw-folder-link {
    width: 100%;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.cw-folder-link:hover .cw-file-title {
    color: var(--cw-blue);
}

.cw-folder-link .cw-file-copy {
    min-width: 0;
    flex: 1;
}

.cw-folder-link .cw-file-title,
.cw-folder-link .cw-file-location {
    display: block;
}

.cw-folder-icon {
    background: #fff2d7;
    color: #e29719;
    font-size: 18px;
}

.cw-folder-row td {
    background: #fbfdff;
}

.cw-folder-row:hover td {
    background: #f4f9ff !important;
}

.cw-file-icon {
    width: 37px;
    height: 37px;
    min-width: 37px;
    margin-right: 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf3ff;
    color: var(--cw-blue);
    font-size: 16px;
}

.cw-file-copy {
    min-width: 0;
}

.cw-file-title {
    max-height: 38px;
    overflow: hidden;
    color: #213753;
    display: -webkit-box;
    font-size: 13px;
    font-weight: 700;
    line-height: 19px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cw-file-location {
    margin-top: 3px;
    overflow: hidden;
    color: #92a0b2;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-type-badge {
    max-width: 82px;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    overflow: hidden;
    background: #edf3fb;
    color: #61748e;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-type-badge.is-slide { background: #eaf2ff; color: #2567cf; }
.cw-type-badge.is-audio { background: #ecf8f4; color: #168567; }
.cw-type-badge.is-video { background: #fff0f2; color: #c85165; }
.cw-type-badge.is-archive { background: #fff5e7; color: #ad6c11; }
.cw-type-badge.is-document { background: #f2efff; color: #7156bc; }
.cw-type-badge.is-image { background: #edf8ff; color: #2780ac; }
.cw-type-badge.is-folder { background: #fff3dc; color: #ad7419; }

.cw-size-large {
    color: #ad6c11;
    font-weight: 700;
}

.cw-download {
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf3ff;
    color: var(--cw-blue);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.cw-download i {
    margin-right: 5px;
}

.cw-download:hover {
    background: var(--cw-blue);
    color: #fff;
    text-decoration: none;
}

.cw-enter-folder {
    height: 32px;
    padding: 0 11px;
    border: 1px solid #cfe0f4;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f8ff;
    color: var(--cw-blue);
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.cw-enter-folder i {
    margin-right: 5px;
}

.cw-enter-folder:hover {
    border-color: var(--cw-blue);
    background: var(--cw-blue);
    color: #fff;
}

.cw-empty {
    height: 230px !important;
    color: #8999ae !important;
    text-align: center;
}

.cw-empty > i {
    margin-right: 7px;
    color: #7eaeea;
    font-size: 20px;
}

.cw-empty strong,
.cw-empty span {
    display: block;
}

.cw-empty strong {
    margin-top: 8px;
    color: #60738d;
    font-size: 14px;
}

.cw-empty span {
    margin-top: 5px;
    font-size: 12px;
}

.cw-pagination {
    min-height: 38px;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.cw-pagination button {
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    background: #fff;
    color: #52657e;
    cursor: pointer;
}

.cw-pagination button:hover:not(:disabled),
.cw-pagination button.is-current {
    border-color: var(--cw-blue);
    background: var(--cw-blue);
    color: #fff;
}

.cw-pagination button:disabled {
    cursor: default;
    opacity: .45;
}

.cw-pagination span {
    margin-left: 6px;
    color: #8a99ac;
    font-size: 12px;
}

.cw-drawer-mask {
    display: none;
}

@media (max-width: 1280px) {
    .cw-brand { min-width: 215px; }
    .cw-main-nav a { padding: 0 11px; }
    .cw-main-nav a.is-active:after { right: 11px; left: 11px; }
    .cw-account-name { max-width: 75px; }
    .cw-stats { min-width: 470px; }
    .cw-filters { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 1024px) {
    .cw-topbar-inner,
    .cw-main { width: calc(100% - 28px); }
    .cw-main-nav { display: none; }
    .cw-overview { align-items: flex-start; flex-direction: column; }
    .cw-stats { width: 100%; min-width: 0; margin-top: 22px; }
    .cw-group-panel { width: 230px; min-width: 230px; }
}

@media (max-width: 820px) {
    .cw-topbar { height: 64px; }
    .cw-brand { min-width: 0; }
    .cw-brand-mark { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
    .cw-brand-copy small { display: none; }
    .cw-account { margin-left: auto; }
    .cw-account-name,
    .cw-account-icon { display: none; }
    .cw-logout { width: 40px; margin: 0; padding: 0; font-size: 0; }
    .cw-logout i { margin: 0; font-size: 16px; }
    .cw-main { padding-top: 14px; }
    .cw-overview { min-height: 0; padding: 24px; }
    .cw-overview h1 { font-size: 28px; }
    .cw-stats { grid-template-columns: repeat(2, 1fr); }
    .cw-stat { min-height: 84px; }
    .cw-workspace { overflow: visible; }
    .cw-group-panel {
        position: fixed;
        z-index: 90;
        top: 0;
        bottom: 0;
        left: -300px;
        width: 280px;
        min-width: 280px;
        padding-top: 28px;
        border-right: 0;
        overflow-y: auto;
        box-shadow: 18px 0 45px rgba(24, 54, 92, .2);
        transition: left .22s ease;
    }
    .cw-group-panel.is-open { left: 0; }
    .cw-results-panel { padding: 20px 16px; }
    .cw-content-search { margin-top: 14px; }
    .cw-mobile-groups {
        height: 36px;
        padding: 0 12px;
        border: 1px solid #dce6f2;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        background: #f7faff;
        color: var(--cw-blue);
    }
    .cw-folder-back { height: 36px; }
    .cw-mobile-groups i { margin-right: 5px; }
    .cw-drawer-mask {
        position: fixed;
        z-index: 80;
        inset: 0;
        background: rgba(16, 34, 58, .38);
    }
    .cw-drawer-mask.is-open { display: block; }
    .cw-filters { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
}

@media (max-width: 560px) {
    .cw-topbar-inner,
    .cw-main { width: calc(100% - 18px); }
    .cw-brand-copy strong { font-size: 16px; }
    .cw-overview { padding: 21px 18px; border-radius: 15px; }
    .cw-eyebrow { letter-spacing: .8px; }
    .cw-overview h1 { font-size: 25px; }
    .cw-overview p { font-size: 13px; }
    .cw-stats { gap: 8px; }
    .cw-stat { min-height: 76px; padding: 13px; }
    .cw-stat strong { font-size: 22px; }
    .cw-results-panel { padding: 17px 11px; }
    .cw-result-title-row { align-items: center; }
    .cw-result-title-row h2 { font-size: 19px; }
    .cw-result-actions { gap: 6px; }
    .cw-folder-back { padding: 0 10px; font-size: 12px; }
    .cw-filters { grid-template-columns: 1fr 1fr; gap: 8px; }
    .cw-content-search button { min-width: 68px; }
    .cw-reset { width: 100%; }
    .cw-table { min-width: 0; }
    .cw-table thead,
    .cw-col-operation,
    .cw-col-date,
    .cw-col-size,
    .cw-col-type { display: none; }
    .cw-table tr { display: block; }
    .cw-table td { display: none; }
    .cw-table td:first-child {
        min-height: 114px;
        height: auto;
        padding: 14px 12px 48px;
        display: block;
        position: relative;
    }
    .cw-table td:first-child .cw-mobile-meta {
        margin: 9px 0 0 47px;
        display: flex;
        flex-wrap: wrap;
        gap: 5px 10px;
        color: #8392a6;
        font-size: 11px;
    }
    .cw-table td:first-child .cw-mobile-download {
        position: absolute;
        right: 12px;
        bottom: 12px;
        display: inline-flex;
    }
    .cw-pagination { justify-content: center; flex-wrap: wrap; }
    .cw-pagination span { width: 100%; margin: 5px 0 0; text-align: center; }
}

@media (min-width: 561px) {
    .cw-mobile-meta,
    .cw-mobile-download { display: none; }
}

/* R7 visual design layer: presentation only, keeps the original Resource contract intact. */
:root {
    --cw-blue: #176cf1;
    --cw-blue-dark: #0c4fb8;
    --cw-cyan: #15b8d8;
    --cw-ink: #102542;
    --cw-text: #41536d;
    --cw-line: #e1e9f4;
    --cw-bg: #f2f6fb;
    --cw-shadow: 0 18px 48px rgba(31, 65, 109, .08);
    --cw-shadow-soft: 0 10px 30px rgba(31, 78, 136, .07);
}

body.cw-page {
    background:
        radial-gradient(circle at 8% 2%, rgba(71, 151, 255, .1), transparent 25%),
        radial-gradient(circle at 96% 8%, rgba(21, 184, 216, .08), transparent 22%),
        var(--cw-bg);
}

.cw-topbar {
    height: 68px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 7px 26px rgba(31, 66, 111, .055);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.cw-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(145deg, #3393ff 0%, #176cf1 55%, #0c54c8 100%);
    box-shadow: 0 10px 24px rgba(18, 104, 232, .24), inset 0 1px 0 rgba(255,255,255,.32);
}

.cw-brand-copy small { letter-spacing: 1.5px; }
.cw-main-nav a.is-active:after { background: linear-gradient(90deg, var(--cw-blue), var(--cw-cyan)); }

.cw-account-icon {
    border: 1px solid #dbeaff;
    background: linear-gradient(145deg, #f3f8ff, #e3efff);
}

.cw-logout { border-radius: 10px; }

.cw-main { padding: 20px 0 38px; }

.cw-overview {
    position: relative;
    min-height: 154px;
    padding: 26px 28px;
    border-radius: 22px;
    background:
        radial-gradient(circle at 93% 5%, rgba(72, 158, 255, .2), transparent 26%),
        radial-gradient(circle at 66% 124%, rgba(24, 184, 217, .15), transparent 34%),
        linear-gradient(118deg, #fff 0%, #f8fbff 47%, #edf6ff 100%);
}

.cw-overview:before {
    position: absolute;
    top: -68px;
    right: 33%;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(63, 147, 255, .12);
    border-radius: 50%;
    content: "";
}

.cw-overview-copy {
    position: relative;
    z-index: 2;
    width: 250px;
    min-width: 250px;
}

.cw-overview h1 { font-size: 32px; }

.cw-overview-art {
    position: relative;
    z-index: 1;
    width: 218px;
    height: 126px;
    margin: -12px 10px -8px 4px;
    object-fit: contain;
    filter: drop-shadow(0 15px 18px rgba(37, 96, 170, .13));
    pointer-events: none;
}

.cw-stats {
    position: relative;
    z-index: 2;
    width: 430px;
    min-width: 430px;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.cw-stat {
    min-height: 64px;
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 10px 28px rgba(41, 84, 137, .075);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cw-stat:hover {
    border-color: rgba(92, 158, 240, .38);
    box-shadow: 0 14px 30px rgba(41, 84, 137, .11);
    transform: translateY(-2px);
}

.cw-stat > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cw-stat > div > span {
    color: #7b8ca4;
    font-size: 12px;
}

.cw-stat strong { margin-top: 2px; font-size: 23px; }

.cw-stat .cw-stat-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    margin-right: 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #eff6ff, #e2efff);
    color: var(--cw-blue);
    font-size: 16px;
}

.cw-stat:nth-child(2) .cw-stat-icon { background: #eef9f8; color: #159078; }
.cw-stat:nth-child(3) .cw-stat-icon { background: #f2efff; color: #7357c5; }
.cw-stat:nth-child(4) .cw-stat-icon { background: #f2f5f8; color: #71839b; }

.cw-workspace {
    margin-top: 20px;
    border-color: #dfe8f3;
    border-radius: 20px;
    box-shadow: 0 20px 52px rgba(29, 66, 111, .09);
}

.cw-group-panel {
    width: 278px;
    min-width: 278px;
    padding: 24px 15px;
    background:
        linear-gradient(180deg, rgba(235,245,255,.72), rgba(250,253,255,.96) 165px),
        #fafdff;
}

.cw-group-heading { padding: 0 10px 16px; }
.cw-group-heading h2 { font-size: 19px; }

.cw-group-heading .cw-group-total {
    height: 28px;
    border: 1px solid #dceaff;
    background: #fff;
    box-shadow: 0 5px 14px rgba(34, 94, 165, .06);
}

.cw-group-search {
    height: 42px;
    margin: 0 5px 15px;
    border-color: #dce6f2;
    border-radius: 11px;
    box-shadow: 0 7px 18px rgba(36, 83, 137, .045);
}

.cw-group-search:focus-within {
    border-color: #8cb9ef;
    box-shadow: 0 0 0 3px rgba(23,108,241,.07);
}

.cw-group-list {
    max-height: 676px;
    scrollbar-color: #cfdeef transparent;
    scrollbar-width: thin;
}

.cw-group-list button {
    min-height: 46px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 11px;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.cw-group-list button:hover {
    border-color: #dceaff;
    background: rgba(255,255,255,.88);
    transform: translateX(2px);
}

.cw-group-list button.is-active {
    border-color: #cfe2ff;
    background: linear-gradient(100deg, #e8f2ff, #f6faff);
    box-shadow: inset 3px 0 0 var(--cw-blue), 0 8px 18px rgba(30, 94, 175, .065);
    color: var(--cw-blue);
}

.cw-group-list button > i { font-size: 14px; }

.cw-group-list button > em {
    min-width: 28px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(225,236,249,.75);
    text-align: center;
}

.cw-results-panel { padding: 25px 27px 27px; }

.cw-result-head {
    padding: 0 2px 18px;
    border-color: #e6edf6;
}

.cw-breadcrumb { font-size: 12px; }
.cw-breadcrumb button:hover { color: var(--cw-blue); }
.cw-result-title-row { margin-top: 9px; }
.cw-result-title-row h2 { font-size: 24px; letter-spacing: .2px; }

.cw-folder-back,
.cw-mobile-groups {
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(37, 81, 132, .055);
}

.cw-content-search {
    height: 50px;
    margin-top: 18px;
    border-color: #dce6f2;
    border-radius: 14px 14px 0 0;
    background: #fff;
    box-shadow: var(--cw-shadow-soft);
}

.cw-content-search > i {
    width: 32px;
    height: 32px;
    margin-left: 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf5ff;
    color: var(--cw-blue);
}

.cw-content-search button {
    min-width: 94px;
    background: linear-gradient(135deg, #2782f3, #1267e6);
    box-shadow: inset 1px 0 rgba(255,255,255,.22);
    letter-spacing: 1px;
}

.cw-content-search button:hover { background: linear-gradient(135deg, #1674ed, #0c55c8); }

.cw-filters {
    padding: 13px 14px 15px;
    border: 1px solid #dce6f2;
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #fbfdff, #f6f9fd);
    box-shadow: 0 13px 26px rgba(37, 81, 132, .055);
}

.cw-filters label > span {
    margin-bottom: 7px;
    color: #73849b;
    font-weight: 600;
}

.cw-filters label > span i {
    width: 17px;
    color: #7ba8df;
}

.cw-filters select,
.cw-reset {
    height: 42px;
    border-radius: 10px;
    background-color: #fff;
}

.cw-reset {
    box-shadow: 0 5px 12px rgba(41, 77, 119, .04);
    font-weight: 600;
}

.cw-table-wrap {
    margin-top: 18px;
    border-color: #dfe7f1;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(34, 70, 115, .045);
}

.cw-table th {
    height: 48px;
    background: linear-gradient(180deg, #f8fbff, #f3f7fc);
    color: #687b94;
    font-weight: 700;
}

.cw-table td {
    height: 72px;
    border-top-color: #e9eff6;
}

.cw-table tbody tr { transition: box-shadow .18s ease; }
.cw-table tbody tr:hover { box-shadow: inset 3px 0 0 #91bfff; }
.cw-table tbody tr:hover td { background: #f8fbff; }

.cw-file-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: 1px solid #dceaff;
    border-radius: 12px;
    background: linear-gradient(145deg, #f1f7ff, #e5f0ff);
    box-shadow: 0 6px 14px rgba(42, 103, 179, .065);
}

.cw-folder-icon {
    border-color: #f4e2bd;
    background: linear-gradient(145deg, #fff9ed, #fff0d2);
}

.cw-folder-row td { background: #fcfdff; }
.cw-file-title { color: #16304f; font-size: 13px; }
.cw-file-location { color: #8899ae; }

.cw-type-badge {
    padding: 5px 9px;
    border: 1px solid rgba(128,151,181,.12);
    font-weight: 600;
}

.cw-download,
.cw-enter-folder {
    min-width: 68px;
    height: 34px;
    border: 1px solid #d4e5fa;
    border-radius: 10px;
    background: linear-gradient(145deg, #f2f7ff, #e7f1ff);
    box-shadow: 0 6px 14px rgba(36, 91, 159, .055);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.cw-download:hover,
.cw-enter-folder:hover {
    border-color: var(--cw-blue);
    background: linear-gradient(135deg, #2782f3, #1267e6);
    box-shadow: 0 9px 18px rgba(23,108,241,.2);
    transform: translateY(-1px);
}

.cw-pagination { margin-top: 20px; }

.cw-pagination button {
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(34, 70, 115, .035);
}

@media (max-width: 1280px) {
    .cw-overview-art { width: 170px; margin-right: 4px; }
    .cw-stats { width: 400px; min-width: 400px; }
    .cw-stat { padding: 11px; }
    .cw-stat .cw-stat-icon { margin-right: 8px; }
}

@media (max-width: 1100px) {
    .cw-overview-art { display: none; }
    .cw-overview-copy { width: 280px; min-width: 280px; }
    .cw-stats { width: 430px; min-width: 430px; }
}

@media (max-width: 1024px) {
    .cw-overview-copy { width: auto; min-width: 0; }
    .cw-stats { width: 100%; min-width: 0; margin-top: 20px; }
    .cw-group-panel { width: 242px; min-width: 242px; }
}

@media (max-width: 820px) {
    .cw-topbar { height: 64px; }
    .cw-overview { padding: 24px; }
    .cw-overview:before { right: -80px; }
    .cw-group-panel { width: 286px; min-width: 286px; }
    .cw-results-panel { padding: 21px 17px; }
    .cw-filters { grid-template-columns: repeat(2, minmax(125px, 1fr)); }
}

@media (max-width: 560px) {
    .cw-main { padding-top: 12px; }
    .cw-overview { padding: 21px 18px; }
    .cw-stats { margin-top: 17px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cw-stat { min-height: 72px; padding: 10px; }
    .cw-stat .cw-stat-icon { width: 34px; height: 34px; min-width: 34px; border-radius: 10px; }
    .cw-stat > div > span { font-size: 11px; }
    .cw-stat strong { font-size: 21px; }
    .cw-result-title-row { align-items: flex-start; }
    .cw-result-actions { align-items: stretch; flex-direction: column; }
    .cw-folder-back,
    .cw-mobile-groups { height: 32px; }
    .cw-content-search { height: 46px; border-radius: 12px 12px 0 0; }
    .cw-content-search > i { width: 28px; height: 28px; }
    .cw-filters { padding: 11px; border-radius: 0 0 12px 12px; }
    .cw-filters select,
    .cw-reset { height: 40px; }
    .cw-table-wrap { margin-top: 14px; }
    .cw-table td:first-child { min-height: 112px; border-radius: 0; }
    .cw-download,
    .cw-enter-folder { min-width: 66px; }
}

/* R8 mockup-led redesign: integrated hero, denser workspace and row-level return action. */
body.cw-page {
    background:
        radial-gradient(circle at 4% 0, rgba(69, 150, 255, .12), transparent 24%),
        radial-gradient(circle at 96% 7%, rgba(34, 190, 220, .08), transparent 21%),
        linear-gradient(rgba(55, 118, 193, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 118, 193, .025) 1px, transparent 1px),
        #f3f7fc;
    background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

.cw-topbar {
    height: 66px;
    border-bottom-color: #dfe8f4;
    box-shadow: 0 8px 28px rgba(32, 73, 123, .06);
}

.cw-topbar-inner,
.cw-main {
    width: calc(100% - 28px);
    max-width: 1540px;
}

.cw-main { padding-top: 14px; }

.cw-overview {
    position: relative;
    min-height: 272px;
    padding: 40px 46px 30px;
    display: block;
    border-color: rgba(194, 218, 248, .88);
    border-radius: 18px;
    background:
        radial-gradient(circle at 78% 14%, rgba(109, 182, 255, .2), transparent 25%),
        linear-gradient(116deg, #fff 0%, #f7fbff 46%, #e8f4ff 100%);
    box-shadow: 0 18px 48px rgba(31, 77, 132, .085), inset 0 1px 0 #fff;
}

.cw-overview:before {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    border: 0;
    border-radius: inherit;
    background:
        linear-gradient(rgba(58, 132, 220, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(58, 132, 220, .04) 1px, transparent 1px);
    background-size: 34px 34px;
    content: "";
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
    mask-image: linear-gradient(90deg, transparent, #000 45%, #000);
}

.cw-overview:after {
    position: absolute;
    right: -9%;
    bottom: -118px;
    width: 70%;
    height: 230px;
    border: 1px solid rgba(61, 146, 242, .1);
    border-radius: 50%;
    content: "";
    transform: rotate(-4deg);
}

.cw-overview-copy {
    position: relative;
    z-index: 3;
    width: 56%;
    min-width: 0;
}

.cw-eyebrow {
    color: #0d67ef;
    font-size: 11px;
    letter-spacing: 2px;
}

.cw-overview h1 {
    margin-top: 10px;
    font-size: 40px;
    line-height: 1.2;
    letter-spacing: 1.2px;
}

.cw-overview-art {
    position: absolute;
    z-index: 1;
    top: 0;
    right: -12px;
    width: 64%;
    height: 100%;
    margin: 0;
    object-fit: contain;
    object-position: right center;
    filter: drop-shadow(0 18px 24px rgba(26, 90, 173, .1));
    opacity: .96;
}

.cw-stats {
    position: absolute;
    z-index: 4;
    bottom: 30px;
    left: 46px;
    width: 58%;
    min-width: 0;
    grid-template-columns: repeat(4, minmax(132px, 1fr));
    gap: 12px;
}

.cw-stat {
    min-height: 78px;
    padding: 12px 15px;
    border-color: rgba(202, 219, 241, .9);
    border-radius: 15px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 12px 30px rgba(37, 79, 129, .08), inset 0 1px 0 #fff;
}

.cw-stat .cw-stat-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    margin-right: 11px;
    border-radius: 13px;
    background: linear-gradient(145deg, #edf5ff, #dfeeff);
    font-size: 17px;
}

.cw-stat:nth-child(2) .cw-stat-icon { background: linear-gradient(145deg, #e8faf7, #d7f3ef); }
.cw-stat:nth-child(3) .cw-stat-icon { background: linear-gradient(145deg, #f3efff, #e9e1ff); }
.cw-stat:nth-child(4) .cw-stat-icon { background: linear-gradient(145deg, #fff7e9, #ffecd0); color: #e29118; }
.cw-stat strong { font-size: 25px; line-height: 1.05; }

.cw-workspace {
    margin-top: 16px;
    border-color: #dfe8f3;
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 20px 52px rgba(31, 70, 118, .085);
}

.cw-group-panel {
    width: 282px;
    min-width: 282px;
    padding: 24px 14px;
    background:
        radial-gradient(circle at 6% 4%, rgba(72, 153, 255, .1), transparent 25%),
        linear-gradient(180deg, #fbfdff, #f7fbff);
}

.cw-group-heading {
    padding: 0 9px 17px;
    align-items: center;
}

.cw-group-heading > div { min-width: 0; flex: 1; }

.cw-group-title-icon {
    width: 35px;
    height: 35px;
    min-width: 35px;
    margin-right: 9px;
    border: 1px solid #d7e7fb;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--cw-blue) !important;
    box-shadow: 0 7px 18px rgba(35, 87, 151, .06);
    font-size: 15px !important;
}

.cw-group-heading h2 { font-size: 18px; }

.cw-group-search {
    margin-bottom: 17px;
    background: rgba(255,255,255,.94);
}

.cw-group-list button {
    min-height: 47px;
    margin: 3px 0;
    border-radius: 12px;
}

.cw-group-list button.is-active {
    border-color: #d4e6ff;
    background: linear-gradient(100deg, #eaf3ff, #f5f9ff);
    box-shadow: inset 4px 0 0 #176cf1, 0 8px 18px rgba(31, 93, 174, .06);
}

.cw-results-panel { padding: 24px 27px 26px; }

.cw-result-head {
    padding: 0 4px 16px;
    border-bottom-color: #e5edf6;
}

.cw-result-title-row { margin-top: 10px; }
.cw-result-title-row h2 { font-size: 25px; }
.cw-result-actions .cw-mobile-back { display: none; }

.cw-content-search {
    height: 48px;
    margin-top: 16px;
    border-radius: 13px 13px 0 0;
    box-shadow: 0 11px 28px rgba(31, 73, 123, .06);
}

.cw-filters {
    padding: 12px 14px 14px;
    border-radius: 0 0 13px 13px;
    box-shadow: 0 11px 28px rgba(31, 73, 123, .06);
}

.cw-table-wrap {
    margin-top: 16px;
    border-radius: 13px;
    box-shadow: 0 12px 30px rgba(31, 73, 123, .05);
}

.cw-col-name { width: 49%; }
.cw-col-operation { width: 17%; }
.cw-col-date { width: 14%; }
.cw-col-size { width: 9%; }
.cw-col-type { width: 11%; }

.cw-table th {
    height: 46px;
    background: linear-gradient(180deg, #f8fbff, #f3f7fc);
}

.cw-table td { height: 70px; }

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

.cw-enter-folder {
    border-color: #176cf1;
    background: linear-gradient(135deg, #2a82f4, #176cf1);
    color: #fff;
    box-shadow: 0 8px 17px rgba(23,108,241,.18);
}

.cw-enter-folder:hover {
    background: linear-gradient(135deg, #176fe8, #0d56c8);
    color: #fff;
}

.cw-download {
    border-color: #cfe0f4;
    background: #fff;
    box-shadow: 0 6px 14px rgba(36, 91, 159, .045);
}

.cw-folder-icon {
    border-color: #f3dcae;
    background: linear-gradient(145deg, #fff8e8, #ffebc3);
    color: #ef9b15;
}

@media (max-width: 1280px) {
    .cw-overview { min-height: 258px; padding-right: 32px; padding-left: 34px; }
    .cw-overview-art { right: -55px; width: 62%; opacity: .82; }
    .cw-stats { right: 34px; bottom: 26px; left: 34px; width: 64%; }
    .cw-stat { padding: 10px 11px; }
    .cw-stat .cw-stat-icon { width: 36px; height: 36px; min-width: 36px; margin-right: 8px; }
}

@media (max-width: 1024px) {
    .cw-overview { min-height: 278px; padding: 30px; }
    .cw-overview-copy { width: 70%; }
    .cw-overview-art { right: -95px; width: 70%; opacity: .28; }
    .cw-stats {
        right: 30px;
        bottom: 28px;
        left: 30px;
        width: auto;
        grid-template-columns: repeat(4, minmax(110px, 1fr));
    }
    .cw-group-panel { width: 242px; min-width: 242px; }
    .cw-col-name { width: 45%; }
    .cw-col-operation { width: 19%; }
}

@media (max-width: 820px) {
    .cw-overview { min-height: 0; padding: 25px 24px; }
    .cw-overview-copy { width: 100%; }
    .cw-overview-art { display: none; }
    .cw-overview h1 { font-size: 31px; }
    .cw-stats {
        position: relative;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        margin-top: 22px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .cw-stat { min-height: 70px; }
    .cw-result-actions .cw-mobile-back { display: inline-flex; }
    .cw-group-panel { width: 286px; min-width: 286px; }
}

@media (max-width: 560px) {
    .cw-overview { padding: 22px 18px; }
    .cw-overview h1 { font-size: 28px; }
    .cw-eyebrow { font-size: 10px; letter-spacing: 1.2px; }
    .cw-stats { margin-top: 18px; gap: 8px; }
    .cw-stat { min-height: 66px; padding: 9px; }
    .cw-stat .cw-stat-icon { width: 34px; height: 34px; min-width: 34px; }
    .cw-stat strong { font-size: 21px; }
    .cw-results-panel { padding: 18px 11px; }
    .cw-result-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
    .cw-result-actions .cw-mobile-back,
    .cw-mobile-groups { height: 34px; }
}

/* R10: archive read-only preview and clearer directory language. */
.cw-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.cw-file-actions,
.cw-mobile-file-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cw-mobile-file-actions { display: none; }

.cw-archive-preview {
    height: 34px;
    min-width: 68px;
    padding: 0 10px;
    border: 1px solid #cfe0f6;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fbff, #edf5ff);
    color: #176cf1;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 5px 13px rgba(35, 75, 124, .045);
}

.cw-archive-preview i { margin-right: 5px; }
.cw-archive-preview:hover { border-color: #91b9ec; background: #e7f2ff; color: #095ac9; }

html.cw-archive-open,
html.cw-archive-open body { overflow: hidden; }

.cw-archive-modal {
    position: fixed;
    z-index: 5000;
    inset: 0;
    padding: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 34, 62, .55);
    backdrop-filter: blur(5px);
}

.cw-archive-modal[hidden] { display: none; }

.cw-archive-dialog {
    width: min(1080px, 100%);
    height: min(780px, calc(100vh - 68px));
    min-height: 540px;
    border: 1px solid rgba(205, 222, 244, .9);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 28px 80px rgba(10, 36, 72, .26);
}

.cw-archive-head {
    min-height: 82px;
    padding: 15px 22px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid #e2ebf5;
    background: linear-gradient(105deg, #f9fcff 0%, #eef6ff 55%, #f7f3ff 100%);
}

.cw-archive-head-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border: 1px solid #cfe1f9;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #176cf1;
    font-size: 21px;
    box-shadow: 0 8px 20px rgba(36, 89, 153, .09);
}

.cw-archive-head-copy {
    min-width: 0;
    flex: 1;
}

.cw-archive-head-copy > span {
    color: #7a8ba2;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
}

.cw-archive-head-copy h2 {
    margin: 4px 0 0;
    overflow: hidden;
    color: #163657;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-archive-readonly {
    padding: 7px 10px;
    border: 1px solid #ccebdc;
    border-radius: 20px;
    background: #f1fbf6;
    color: #19875a;
    font-size: 12px;
    font-weight: 700;
}

.cw-archive-close {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border: 1px solid #d9e4f1;
    border-radius: 11px;
    background: rgba(255,255,255,.88);
    color: #60738b;
    font-size: 17px;
    cursor: pointer;
}

.cw-archive-close:hover { border-color: #aac5e7; color: #176cf1; }

.cw-archive-summary {
    min-height: 52px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #edf2f8;
    background: #fbfdff;
}

.cw-archive-summary > span {
    padding: 6px 10px;
    border-radius: 8px;
    background: #eef5fd;
    color: #60738b;
    font-size: 12px;
}

.cw-archive-summary strong { color: #1b4e88; }
.cw-archive-summary .is-warning { background: #fff5e8; color: #aa680b; }
.cw-archive-summary .is-error { background: #fff0f0; color: #c64242; }

.cw-archive-tools {
    padding: 12px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #e8eef6;
}

.cw-archive-breadcrumb {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: #7c8ca1;
    font-size: 12px;
}

.cw-archive-breadcrumb button {
    max-width: 180px;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: transparent;
    color: #4071a8;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.cw-archive-breadcrumb span {
    overflow: hidden;
    color: #203f61;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-archive-tools label {
    width: 270px;
    min-width: 220px;
    height: 38px;
    padding: 0 11px;
    border: 1px solid #d6e2f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #7f91a8;
}

.cw-archive-tools input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #263f5d;
}

.cw-archive-content {
    min-height: 0;
    flex: 1;
    overflow: auto;
    background: #fff;
}

.cw-archive-table-wrap { min-width: 720px; }

.cw-archive-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.cw-archive-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    height: 42px;
    padding: 0 18px;
    border-bottom: 1px solid #e1eaf4;
    background: #f6f9fd;
    color: #6f8299;
    text-align: left;
    font-size: 12px;
}

.cw-archive-table th:first-child { width: 48%; }
.cw-archive-table th:nth-child(2) { width: 34%; }
.cw-archive-table th:last-child { width: 18%; }

.cw-archive-table td {
    height: 54px;
    padding: 7px 18px;
    border-bottom: 1px solid #edf2f7;
    overflow: hidden;
    color: #708196;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.cw-archive-table tr:hover td { background: #f9fbfe; }

.cw-archive-table .is-folder button {
    width: 100%;
    padding: 0;
    border: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    background: transparent;
    color: #214a75;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.cw-archive-table .is-folder button > span:nth-child(2) {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-archive-file {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    color: #294a6c;
}

.cw-archive-file > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cw-archive-file small {
    margin-left: 8px;
    color: #b27626;
    font-size: 10px;
}

.cw-archive-file-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf5ff;
    color: #2475d9;
}

.cw-archive-table .is-folder .cw-archive-file-icon { background: #fff4dc; color: #e69818; }

.cw-archive-state {
    min-height: 320px;
    padding: 45px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8797aa;
    text-align: center;
}

.cw-archive-state > i { margin-bottom: 14px; color: #6b9ede; font-size: 34px; }
.cw-archive-state strong { margin-bottom: 7px; color: #345678; font-size: 16px; }
.cw-archive-state span { max-width: 560px; line-height: 1.7; }
.cw-archive-state.is-error > i { color: #d78a8a; }
.cw-archive-limit { padding: 11px 18px; background: #fff8e9; color: #9b701e; text-align: center; font-size: 12px; }

.cw-archive-foot {
    min-height: 40px;
    padding: 9px 22px;
    border-top: 1px solid #e8eef5;
    background: #f8fbfe;
    color: #7c8fa6;
    font-size: 11px;
}

.cw-archive-foot i { margin-right: 7px; color: #36a174; }

@media (max-width: 1280px) {
    .cw-file-actions .cw-archive-preview { width: 34px; min-width: 34px; padding: 0; }
    .cw-file-actions .cw-archive-preview i { margin: 0; }
    .cw-file-actions .cw-archive-preview span { display: none; }
}

@media (max-width: 820px) {
    .cw-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cw-archive-modal { padding: 18px; }
    .cw-archive-dialog { height: calc(100vh - 36px); }
}

@media (max-width: 560px) {
    .cw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cw-stats .cw-stat:last-child { grid-column: 1 / -1; }
    .cw-mobile-file-actions {
        position: absolute;
        right: 12px;
        bottom: 12px;
        display: flex;
    }
    .cw-mobile-file-actions .cw-archive-preview,
    .cw-mobile-file-actions .cw-download { height: 32px; min-width: 62px; }
    .cw-archive-modal { padding: 0; }
    .cw-archive-dialog { width: 100%; height: 100vh; min-height: 0; border: 0; border-radius: 0; }
    .cw-archive-head { min-height: 70px; padding: 11px 13px; }
    .cw-archive-head-icon { width: 39px; height: 39px; min-width: 39px; border-radius: 11px; }
    .cw-archive-head-copy h2 { font-size: 15px; }
    .cw-archive-readonly { display: none; }
    .cw-archive-summary { padding: 8px 12px; }
    .cw-archive-tools { padding: 10px 12px; align-items: stretch; flex-direction: column; gap: 9px; }
    .cw-archive-tools label { width: 100%; min-width: 0; }
    .cw-archive-table-wrap { min-width: 650px; }
    .cw-archive-foot { padding: 8px 12px; }
}

/* R13: physical directory tree, explicit parent navigation and cached refresh. */
.cw-tree-tools {
    display: flex;
    gap: 8px;
    margin: 10px 0 12px;
}

.cw-tree-tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 11px;
    border: 1px solid #d7e3f2;
    border-radius: 9px;
    color: #456481;
    background: #fff;
    font-size: 12px;
    cursor: pointer;
}

.cw-tree-tools button:first-child { flex: 1; }
.cw-tree-tools button i { margin-right: 6px; color: #176cf1; }
.cw-tree-tools button:hover:not(:disabled) { border-color: #a9c8ee; color: #176cf1; background: #f4f9ff; }
.cw-tree-tools button:disabled { opacity: .45; cursor: default; }
.cw-tree-refresh.is-loading { cursor: wait; }

.cw-directory-tree {
    margin-top: 0;
    padding: 2px 0 14px;
}

.cw-directory-tree,
.cw-directory-tree ul {
    list-style: none;
}

.cw-directory-tree ul {
    margin: 0;
    padding: 0;
}

.cw-directory-tree > li,
.cw-directory-tree .cw-tree-item {
    margin: 0;
}

.cw-directory-tree .cw-tree-row {
    display: flex;
    align-items: center;
    min-width: 0;
    min-height: 36px;
    margin-bottom: 2px;
    box-sizing: border-box;
}

.cw-directory-tree .cw-tree-toggle,
.cw-directory-tree .cw-tree-toggle-spacer {
    display: inline-flex;
    flex: 0 0 22px;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 32px;
    padding: 0;
    border: 0;
    color: #7893b5;
    background: transparent;
    box-shadow: none;
}

.cw-directory-tree .cw-tree-toggle { cursor: pointer; }
.cw-directory-tree .cw-tree-toggle:hover { color: #176cf1; background: #edf5ff; }
.cw-directory-tree .cw-tree-toggle > i { width: auto; margin: 0; font-size: 13px; }

.cw-directory-tree .cw-tree-link {
    display: flex;
    flex: 1;
    align-items: center;
    min-width: 0;
    width: auto;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #294765;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}

.cw-directory-tree .cw-tree-link:hover { border-color: #d9e8fa; color: #176cf1; background: #f4f9ff; }
.cw-directory-tree .cw-tree-link.is-active { border-color: #b8d6ff; color: #075fda; background: #eaf4ff; box-shadow: inset 3px 0 0 #176cf1; }
.cw-directory-tree .cw-tree-link > i { flex: 0 0 18px; width: 18px; margin: 0 5px 0 0; color: #2780ed; font-size: 13px; }
.cw-directory-tree .cw-tree-link > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.cw-directory-tree .cw-tree-link > em { flex: 0 0 auto; min-width: 24px; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: #7a93b0; background: #edf3fa; font-size: 10px; font-style: normal; text-align: center; }

.cw-result-actions .cw-header-back { display: inline-flex; }

@media (max-width: 560px) {
    .cw-tree-tools button { height: 36px; }
    .cw-directory-tree .cw-tree-row { min-height: 40px; }
    .cw-directory-tree .cw-tree-link { height: 38px; }
}

/* R15: resizable directory pane and synchronized tree selection. */
.cw-workspace {
    --cw-directory-width: 282px;
}

.cw-group-panel {
    flex: 0 0 var(--cw-directory-width);
    width: var(--cw-directory-width);
    min-width: 0;
    border-right: 0;
    box-sizing: border-box;
}

.cw-results-panel {
    flex: 1 1 0;
    min-width: 0;
}

.cw-workspace-resizer {
    position: relative;
    z-index: 5;
    display: flex;
    flex: 0 0 11px;
    align-items: center;
    justify-content: center;
    width: 11px;
    margin: 0 -5px 0 -6px;
    outline: 0;
    cursor: col-resize;
    touch-action: none;
}

.cw-workspace-resizer:before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5px;
    width: 1px;
    content: "";
    background: #dfe8f3;
    transition: width .16s ease, background .16s ease, box-shadow .16s ease;
}

.cw-workspace-resizer > span {
    position: relative;
    z-index: 1;
    display: flex;
    width: 18px;
    height: 46px;
    border: 1px solid #cfe0f4;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #6d8fb8;
    background: rgba(255,255,255,.96);
    box-shadow: 0 7px 18px rgba(42, 88, 142, .12);
    opacity: .62;
    transform: scale(.96);
    transition: opacity .16s ease, transform .16s ease, border-color .16s ease;
}

.cw-workspace-resizer > span i {
    display: block;
    width: 1px;
    height: 14px;
    border-radius: 1px;
    background: currentColor;
}

.cw-workspace-resizer:hover:before,
.cw-workspace-resizer:focus:before,
body.cw-is-resizing .cw-workspace-resizer:before {
    width: 3px;
    margin-left: -1px;
    background: #5b9df3;
    box-shadow: 0 0 0 4px rgba(23,108,241,.08);
}

.cw-workspace-resizer:hover > span,
.cw-workspace-resizer:focus > span,
body.cw-is-resizing .cw-workspace-resizer > span {
    border-color: #9fc6f8;
    opacity: 1;
    transform: scale(1);
}

body.cw-is-resizing,
body.cw-is-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

.cw-directory-tree .cw-tree-link.is-active {
    position: relative;
    box-shadow: inset 3px 0 0 #176cf1, 0 5px 14px rgba(23,108,241,.09);
}

@media (max-width: 820px) {
    .cw-workspace-resizer { display: none; }
    .cw-group-panel {
        flex-basis: auto;
        width: 286px;
        min-width: 286px;
    }
}

/* R16: stable synchronized rendering without page or tree jitter. */
.cw-group-panel,
.cw-directory-tree {
    overflow-anchor: none;
}

.cw-directory-tree {
    height: calc(100vh - 330px);
    min-height: 360px;
    max-height: 620px;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.cw-results-panel {
    min-height: 620px;
}

.cw-result-status {
    display: inline-block;
    min-height: 1em;
}

body.cw-is-resizing .cw-group-panel,
body.cw-is-resizing .cw-results-panel,
body.cw-is-resizing .cw-workspace-resizer {
    transition: none !important;
}

@media (max-width: 820px) {
    .cw-directory-tree {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow-y: visible;
        scrollbar-gutter: auto;
    }

    .cw-results-panel { min-height: 0; }
}

.cw-list-nav {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin: 4px 0 7px;
}

.cw-list-nav .cw-table-back {
    height: 36px;
    padding: 0 14px;
    border-color: #cfe0f4;
    color: #365d84;
    background: #f8fbff;
    box-shadow: 0 6px 16px rgba(37,81,132,.055);
}

.cw-list-nav .cw-table-back:disabled {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 560px) {
    .cw-list-nav { min-height: 40px; margin-top: 2px; }
    .cw-list-nav .cw-table-back { height: 34px; }
}
