:root {
    --ink: #17203a;
    --muted: #7d8699;
    --line: #e6e9ef;
    --soft: #f5f7fb;
    --blue: #2f66e7;
    --blue-dark: #194bc7;
    --orange: #ff7a3d;
    --white: #fff;
    --danger: #d95555;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--soft); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.svg-sprite { width: 0; height: 0; position: absolute; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fff;
    display: grid; place-items: center; position: relative; overflow: hidden; font-weight: 900; font-size: 17px; flex: none;
}
.brand-mark::after { content: ""; position: absolute; width: 22px; height: 22px; right: -9px; bottom: -8px; border-radius: 7px; background: var(--orange); transform: rotate(19deg); }
.brand-mark-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 21px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: #717a8d; display: inline-grid; place-items: center; cursor: pointer; }
.icon-button:hover { color: var(--ink); background: #f1f3f7; }
.button { min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 750; cursor: pointer; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 7px 18px rgba(47, 102, 231, .16); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: #fff; border-color: #dfe3ea; color: #566075; }
.button-secondary:hover { background: #fafbfc; border-color: #cbd1dc; }

/* Login */
.login-body { background: #f5f6f8; }
.login-page { min-height: 100vh; padding: 32px 20px; display: grid; place-items: center; }
.login-form {
    width: min(100%, 400px);
    padding: 34px;
    background: #fff;
    border: 1px solid #e2e5eb;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(23, 32, 58, .07);
}
.login-brand { display: flex; align-items: center; gap: 12px; padding-bottom: 26px; border-bottom: 1px solid #edf0f4; }
.login-brand > div:last-child { display: grid; gap: 3px; }
.login-brand strong { font-size: 15px; letter-spacing: -.02em; }
.login-brand span { color: #9299a8; font-size: 10px; }
.login-heading { margin: 28px 0 25px; }
.login-heading h1 { margin: 0 0 7px; font-size: 27px; letter-spacing: -.035em; }
.login-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-form > label:not(.remember-label), .form-label { display: grid; gap: 8px; margin-top: 17px; color: #4f586c; font-size: 12px; font-weight: 700; }
.login-form input:not([type="checkbox"]), .form-label input { width: 100%; height: 48px; border: 1px solid #dfe3eb; background: #fff; color: var(--ink); border-radius: 9px; outline: 0; padding: 0 14px; transition: .18s; }
.login-form input:focus, .form-label input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(47, 102, 231, .1); }
.password-field { position: relative; }
.password-field input { padding-right: 63px !important; }
.password-field button { position: absolute; right: 8px; top: 8px; height: 32px; padding: 0 8px; border: 0; background: transparent; color: var(--blue); font-size: 10px; font-weight: 750; cursor: pointer; }
.remember-label { margin: 17px 0 22px; display: flex; align-items: center; gap: 8px; color: #657084; font-size: 11px; }
.remember-label input { width: 15px; height: 15px; accent-color: var(--blue); }
.login-submit { width: 100%; height: 48px; border-radius: 9px; }
.alert { border-radius: 10px; padding: 11px 13px; margin: 16px 0; font-size: 11px; line-height: 1.5; }
.alert-error { color: #a53f3f; background: #fff0f0; border: 1px solid #f4caca; }

/* App shell */
.drive-app { min-height: 100vh; display: flex; }
.sidebar { width: 250px; min-height: 100vh; background: #fff; border-right: 1px solid var(--line); padding: 21px 16px 15px; display: flex; flex-direction: column; flex: none; position: relative; z-index: 40; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 24px; }
.sidebar-brand > div:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 15px; letter-spacing: -.02em; }
.sidebar-brand small { color: #9aa2b1; font-size: 9px; }
.sidebar-close { display: none; margin-left: auto; }
.new-button { width: 100%; height: 44px; border: 0; border-radius: 11px; background: var(--blue); color: #fff; padding: 0 13px; display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 750; box-shadow: 0 7px 18px rgba(47, 102, 231, .18); cursor: pointer; }
.new-button span { margin-left: auto; font-size: 16px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 19px; }
.sidebar-nav a { height: 39px; padding: 0 11px; border-radius: 9px; display: flex; align-items: center; gap: 11px; color: #697286; font-size: 12px; }
.sidebar-nav a:hover { color: var(--ink); background: #f6f7fa; }
.sidebar-nav a.active { color: var(--blue); background: #edf2ff; font-weight: 750; }
.sidebar-nav .icon { width: 18px; height: 18px; }
.nav-divider { height: 1px; background: var(--line); margin: 10px 7px; }
.nav-label { margin: 2px 11px 5px; color: #a2aab8; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.storage-box { margin-top: auto; padding: 14px; background: #f6f8fc; border-radius: 13px; }
.storage-box > div:first-child { display: flex; align-items: center; justify-content: space-between; font-size: 10px; }
.storage-box > div:first-child span { display: flex; align-items: center; gap: 7px; font-weight: 750; }
.storage-box > div:first-child strong { color: var(--blue); }
.storage-box .icon { width: 16px; height: 16px; }
.storage-progress { height: 5px; background: #e1e5ed; border-radius: 5px; margin: 12px 0 9px; overflow: hidden; }
.storage-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #7294ef); }
.storage-box small { color: #9099aa; font-size: 9px; }
.storage-box small b { color: #4d5668; }
.storage-box .storage-disk-free { display: block; margin-top: 5px; color: #a0a8b6; }
.sidebar-account { margin-top: 12px; padding: 14px 4px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 850; flex: none; }
.sidebar-account > div { min-width: 0; display: grid; gap: 2px; }
.sidebar-account strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-account small { color: #9aa2b1; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-scrim { display: none; }

.workspace { min-width: 0; flex: 1; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 70px; flex: none; padding: 0 22px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; }
.mobile-menu { display: none; }
.search-form { width: min(580px, 53vw); height: 40px; border-radius: 10px; background: #f4f6f9; padding: 0 13px; display: flex; align-items: center; gap: 10px; color: #99a1b0; }
.search-form .icon { width: 18px; height: 18px; }
.search-form input { border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; flex: 1; min-width: 0; }
.search-form a { font-size: 17px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.notification-button { position: relative; }
.notification-button i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); border: 1.5px solid #fff; position: absolute; right: 7px; top: 7px; }
.topbar-divider { height: 24px; width: 1px; background: var(--line); margin: 0 8px; }
.workspace-layout { flex: 1; min-width: 0; display: flex; }
.content { min-width: 0; flex: 1; padding: 28px 28px 50px; overflow: hidden; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.breadcrumbs { min-height: 17px; display: flex; align-items: center; gap: 5px; margin-bottom: 10px; color: #9ba3b2; font-size: 9px; }
.breadcrumbs .icon { width: 12px; height: 12px; }
.breadcrumbs a:last-child, .breadcrumbs span { color: #677185; font-weight: 700; }
.page-heading h1 { margin: 0 0 5px; font-size: 28px; letter-spacing: -.045em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.heading-actions { display: flex; gap: 9px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 13px; }
.section-heading h2 { margin: 0 0 3px; font-size: 14px; letter-spacing: -.02em; }
.section-heading p { margin: 0; color: #949dad; font-size: 9px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 10px; }
.quick-manage-button { min-height: 29px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #6d7689; display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 750; cursor: pointer; }
.quick-manage-button:hover { color: var(--blue); border-color: #c8d4f2; }
.quick-manage-button .icon { width: 14px; height: 14px; }
.quick-empty { width: 100%; min-height: 70px; border: 1px dashed #ccd4e2; border-radius: 12px; background: rgba(255,255,255,.55); color: #7c8597; display: flex; align-items: center; padding: 12px 15px; gap: 11px; text-align: left; cursor: pointer; }
.quick-empty:hover { border-color: var(--blue); background: #f8faff; }
.quick-empty > span { width: 37px; height: 37px; border-radius: 10px; background: #eaf0ff; color: var(--blue); display: grid; place-items: center; }
.quick-empty > span .icon { width: 18px; height: 18px; }
.quick-empty strong { font-size: 10px; color: var(--ink); }
.quick-empty small { margin-left: 2px; font-size: 9px; }
.quick-card { min-width: 0; height: 66px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; display: flex; align-items: center; gap: 10px; transition: .16s; }
.quick-card:hover { transform: translateY(-1px); border-color: #c8d4f2; box-shadow: 0 7px 20px rgba(31, 53, 105, .06); }
.quick-icon { width: 37px; height: 37px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.quick-icon.blue { color: var(--blue); background: #edf2ff; }
.quick-icon.violet { color: #765bd7; background: #f2edff; }
.quick-icon.orange { color: #e96c34; background: #fff0e8; }
.quick-icon.green { color: #299f74; background: #e9f8f2; }
.quick-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.quick-card strong { font-size: 10px; }
.quick-card small { color: #98a0af; font-size: 8px; }
.quick-arrow { margin-left: auto; color: #adb4c1; width: 16px; height: 16px; }
.files-section { margin-top: 27px; }
.files-heading { align-items: center; }
.files-tools { display: flex; align-items: center; gap: 3px; }
.files-tools form { display: flex; }
.files-tools select { height: 31px; border: 0; outline: 0; background: transparent; color: #8992a3; font-size: 9px; cursor: pointer; }
.files-tools > span { height: 21px; width: 1px; background: var(--line); margin: 0 5px; }
.files-tools .icon-button { width: 31px; height: 31px; }
.files-tools .icon-button.active { color: var(--blue); background: #eaf0ff; }

.items-grid { display: grid; grid-template-columns: repeat(3, minmax(155px, 1fr)); gap: 11px; }
.item-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: .17s; }
.item-card:hover { border-color: #b9c8ec; box-shadow: 0 6px 18px rgba(40, 57, 97, .06); }
.folder-item { height: 63px; padding: 10px 9px 10px 11px; display: flex; align-items: center; }
.folder-main { min-width: 0; flex: 1; display: flex; align-items: center; gap: 9px; }
.folder-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.folder-icon .icon { width: 25px; height: 25px; fill: currentColor; }
.folder-icon.color-1 { background: #edf2ff; color: #4774e2; }
.folder-icon.color-2 { background: #fff0e8; color: #ef7841; }
.folder-icon.color-3 { background: #eaf8f2; color: #35a67e; }
.folder-icon.color-4 { background: #f2edff; color: #765bd7; }
.item-copy { min-width: 0; display: grid; gap: 5px; text-align: left; }
.item-copy strong { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-copy small { color: #99a1b0; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-more { width: 29px; height: 29px; margin-left: auto; }
.item-more .icon { width: 17px; height: 17px; }
.file-item { overflow: hidden; }
.file-preview { width: 100%; height: 116px; border: 0; padding: 17px; position: relative; overflow: hidden; background: #eef1f5; color: #697387; display: flex; flex-direction: column; justify-content: center; text-align: left; cursor: pointer; }
.file-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.file-preview .preview-label { font-style: normal; font-size: 6px; letter-spacing: .18em; opacity: .58; text-transform: uppercase; }
.file-preview > strong { max-width: 82%; margin-top: 9px; font-size: 13px; line-height: 1.1; letter-spacing: -.03em; }
.file-preview > small { position: absolute; left: 17px; bottom: 12px; font-size: 5px; letter-spacing: .13em; }
.kind-document .file-preview { color: #fff; background: var(--ink); }
.kind-document .file-preview::after { content: ""; width: 91px; height: 91px; background: var(--orange); border-radius: 50%; position: absolute; right: -43px; bottom: -45px; }
.kind-spreadsheet .file-preview { color: #246c47; background: #eff8f2; }
.sheet-decoration { position: absolute; right: 14px; bottom: 13px; width: 61%; height: 25px; opacity: .42; background: repeating-linear-gradient(#78bd94 0 1px, transparent 1px 6px); }
.kind-video .file-preview { align-items: center; color: #fff; background: linear-gradient(135deg, #26324b, #765f56); }
.play-circle { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); color: #1d2740; display: grid; place-items: center; padding-left: 2px; font-size: 10px; }
.kind-video .file-preview small { left: 50%; transform: translateX(-50%); padding: 4px 7px; border-radius: 3px; background: rgba(23, 32, 58, .72); }
.kind-archive .file-preview { align-items: center; color: #ae7e20; background: #fff7e2; }
.preview-big-icon { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.kind-archive .file-preview small { left: 50%; transform: translateX(-50%); }
.file-meta { height: 50px; padding: 8px 8px 8px 9px; display: flex; align-items: center; gap: 8px; }
.item-detail-trigger { min-width: 0; flex: 1; padding: 0; border: 0; background: transparent; cursor: pointer; }
.type-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.type-icon .icon { width: 15px; height: 15px; }
.type-folder, .type-document { color: var(--blue); background: #edf2ff; }
.type-spreadsheet { color: #299467; background: #e9f7ef; }
.type-image { color: #765bd7; background: #f1edff; }
.type-video { color: #e86d37; background: #fff0e8; }
.type-archive { color: #b78723; background: #fff5dd; }
.items-list { display: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-header, .list-row { display: grid; grid-template-columns: minmax(200px, 2fr) .7fr 1fr .5fr; gap: 12px; align-items: center; padding: 0 13px; }
.list-header { height: 37px; background: #fafbfc; border-bottom: 1px solid var(--line); color: #9ba3b2; font-size: 8px; }
.list-row { width: 100%; min-height: 51px; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; color: #6f798d; font-size: 9px; text-align: left; cursor: pointer; }
.list-row:hover { background: #f7f9fe; }
.list-name { min-width: 0; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.list-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-state { min-height: 315px; border: 1px dashed #d6dce6; border-radius: 13px; background: #fff; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state > span { width: 65px; height: 65px; border-radius: 20px; color: var(--blue); background: #edf2ff; display: grid; place-items: center; }
.empty-state > span .icon { width: 34px; height: 34px; }
.empty-state h3 { margin: 18px 0 5px; font-size: 14px; }
.empty-state p { margin: 0 0 19px; color: var(--muted); font-size: 10px; }
.pagination { margin-top: 20px; font-size: 11px; }

.detail-panel { width: 255px; flex: none; padding: 19px 17px; border-left: 1px solid var(--line); background: #fff; }
.detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }
.detail-header h3 { margin: 0; font-size: 13px; }
.detail-empty { min-height: 350px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.detail-empty > span { width: 52px; height: 52px; border-radius: 16px; background: #f1f3f7; color: #9ba3b1; display: grid; place-items: center; }
.detail-empty > span .icon { width: 27px; height: 27px; }
.detail-empty h4 { margin: 14px 0 5px; font-size: 11px; }
.detail-empty p { max-width: 160px; margin: 0; color: #9aa2b1; font-size: 9px; line-height: 1.5; }
.detail-preview { height: 148px; border-radius: 12px; background: #eff1f5; color: #697387; display: grid; place-items: center; overflow: hidden; position: relative; }
.detail-preview img, .detail-preview video, .detail-preview iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.detail-preview .icon { width: 52px; height: 52px; }
.detail-title { padding: 15px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.detail-title > div { min-width: 0; display: grid; gap: 4px; }
.detail-title strong { font-size: 10px; line-height: 1.35; word-break: break-word; }
.detail-title small { color: #99a1b0; font-size: 8px; }
.detail-actions { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.detail-actions button, .detail-actions a { min-height: 33px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #626c80; display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 8px; font-weight: 700; cursor: pointer; }
.detail-actions button:hover, .detail-actions a:hover { background: #f8f9fb; }
.detail-actions .danger { color: var(--danger); }
.detail-actions .icon { width: 16px; height: 16px; }
.detail-info { margin: 0; padding: 15px 0; display: grid; gap: 10px; }
.detail-info div { display: grid; grid-template-columns: 62px 1fr; gap: 7px; font-size: 8px; }
.detail-info dt { color: #9aa2b0; }
.detail-info dd { margin: 0; color: #566075; text-transform: capitalize; word-break: break-word; }

/* Modals */
[hidden] { display: none !important; }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; padding: 20px; background: rgba(20, 27, 44, .48); backdrop-filter: blur(4px); display: grid; place-items: center; }
.modal { width: min(100%, 520px); max-height: calc(100vh - 40px); overflow: auto; padding: 23px; border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(20, 27, 44, .25); }
.modal-small { width: min(100%, 430px); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.modal-header h3 { margin: 0 0 5px; font-size: 17px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 10px; }
.dropzone { min-height: 210px; margin: 22px 0 15px; border: 1.5px dashed #cbd3e2; border-radius: 14px; background: #f9fafe; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; text-align: center; }
.dropzone.dragover { border-color: var(--blue); background: #f2f6ff; }
.dropzone input { display: none; }
.dropzone > span { width: 49px; height: 49px; border-radius: 15px; background: #eaf0ff; color: var(--blue); display: grid; place-items: center; margin-bottom: 13px; }
.dropzone > span .icon { width: 25px; height: 25px; }
.dropzone strong { font-size: 12px; }
.dropzone p { margin: 5px 0 13px; color: var(--muted); font-size: 10px; }
.dropzone small { color: #a0a8b6; font-size: 8px; }
.upload-list { display: grid; gap: 6px; }
.upload-list > div { padding: 8px 10px; background: #f7f8fb; border-radius: 8px; display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }
.upload-list span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list span:last-child { color: #929bab; flex: none; }
.modal-footer { margin-top: 22px; display: flex; justify-content: flex-end; gap: 8px; }
.form-label { margin: 24px 0 4px; }
.form-label select { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #dfe3eb; border-radius: 10px; outline: 0; background: #fafbfc; color: var(--ink); font-size: 11px; }
.form-label select:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(47,102,231,.1); }
.quick-access-modal { width: min(100%, 600px); }
.quick-access-existing { margin-top: 22px; display: grid; gap: 6px; }
.form-section-label { color: #9aa2b1; font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.quick-access-row { min-height: 48px; padding: 7px 8px 7px 11px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: auto minmax(80px, 1fr) auto; align-items: center; gap: 9px; }
.quick-color-dot { width: 9px; height: 9px; border-radius: 50%; }
.quick-color-dot.blue { background: var(--blue); }
.quick-color-dot.violet { background: #765bd7; }
.quick-color-dot.orange { background: var(--orange); }
.quick-color-dot.green { background: #299f74; }
.quick-access-row > span:nth-child(2) { min-width: 0; display: grid; gap: 3px; }
.quick-access-row strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-access-row small { color: #9aa2b1; font-size: 8px; }
.quick-row-actions { display: flex; align-items: center; gap: 3px; }
.quick-row-actions form { margin: 0; }
.quick-row-actions button { min-width: 27px; height: 28px; padding: 0 7px; border: 0; border-radius: 7px; background: #f3f5f8; color: #697286; font-size: 8px; font-weight: 750; cursor: pointer; }
.quick-row-actions button:hover { background: #eaf0ff; color: var(--blue); }
.quick-row-actions button.danger { color: var(--danger); }
.quick-access-form { margin-top: 21px; padding-top: 18px; border-top: 1px solid var(--line); }
.quick-form-heading { display: flex; justify-content: space-between; align-items: center; }
.quick-form-heading button { border: 0; background: transparent; color: var(--blue); font-size: 9px; font-weight: 750; cursor: pointer; }
.form-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid-two .form-label { margin-top: 15px; }
.quick-access-form > .form-label { margin-top: 15px; }
.toast { position: fixed; right: 23px; bottom: 23px; z-index: 110; min-height: 44px; padding: 10px 15px 10px 10px; border-radius: 11px; background: var(--ink); color: #fff; box-shadow: 0 13px 35px rgba(23,32,58,.25); display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 700; animation: toastIn .2s ease-out; }
.toast span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.toast-success span { background: #2fad7c; }
.toast-error span { background: var(--danger); }

@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1120px) {
    .detail-panel { display: none; }
}

@media (max-width: 840px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 18px 0 50px rgba(20,27,44,.16); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close, .mobile-menu { display: inline-grid; }
    .sidebar-scrim { position: fixed; inset: 0; z-index: 30; border: 0; background: rgba(20,27,44,.35); }
    .sidebar-scrim.visible { display: block; }
    .topbar { padding: 0 15px; }
    .search-form { flex: 1; width: auto; }
    .content { padding: 23px 19px 45px; }
    .items-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
    .quick-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

@media (max-width: 560px) {
    .login-page { padding: 20px 16px; }
    .login-form { padding: 27px 22px; border-radius: 14px; }
    .login-heading h1 { font-size: 25px; }
    .topbar-actions .notification-button, .topbar-actions > .icon-button:nth-child(2), .topbar-divider { display: none; }
    .page-heading { align-items: flex-start; }
    .page-heading h1 { font-size: 23px; }
    .heading-actions .button-secondary { display: none; }
    .button { padding: 0 12px; }
    .quick-grid { gap: 8px; }
    .quick-card { height: 59px; padding: 8px; }
    .quick-arrow { display: none; }
    .quick-access-row { grid-template-columns: auto 1fr; }
    .quick-row-actions { grid-column: span 2; justify-content: flex-end; }
    .form-grid-two { grid-template-columns: 1fr; gap: 0; }
    .items-grid { gap: 8px; }
    .folder-item { grid-column: span 2; }
    .file-preview { height: 100px; }
    .file-meta { padding: 7px; }
    .file-meta > .type-icon { display: none; }
    .files-tools select { max-width: 105px; }
    .list-header, .list-row { grid-template-columns: minmax(160px, 1fr) 65px; }
    .list-header span:nth-child(2), .list-header span:nth-child(3), .list-row > span:nth-child(2), .list-row > span:nth-child(3) { display: none; }
    .toast { left: 16px; right: 16px; bottom: 16px; }
}

/* Folder access selector */
#folderModal .modal-small {
    width: min(520px, calc(100vw - 32px));
}

.folder-access-fieldset {
    border: 0;
    padding: 0;
    margin: 22px 0 0;
    min-width: 0;
}

.folder-access-fieldset legend {
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: #344054;
    font-size: 14px;
    font-weight: 700;
}

.folder-access-options {
    display: grid;
    gap: 10px;
}

.folder-access-option {
    position: relative;
    display: block;
    cursor: pointer;
}

.folder-access-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.folder-access-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 76px;
    padding: 13px 14px;
    border: 1px solid #dfe4ec;
    border-radius: 14px;
    background: #ffffff;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.folder-access-option:hover .folder-access-card {
    border-color: #b8c4d6;
    background: #fafbfc;
}

.folder-access-option > input:checked + .folder-access-card {
    border-color: #3168e8;
    background: #f5f8ff;
    box-shadow: 0 0 0 3px rgba(49, 104, 232, 0.1);
}

.folder-access-option > input:focus-visible + .folder-access-card {
    outline: 3px solid rgba(49, 104, 232, 0.2);
    outline-offset: 2px;
}

.folder-access-icon,
.folder-access-note-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: #3168e8;
    background: #eaf0ff;
}

.folder-access-icon .icon,
.folder-access-note-icon .icon {
    width: 20px;
    height: 20px;
}

.folder-access-icon-private {
    color: #d65f27;
    background: #fff0e9;
}

.folder-access-copy {
    display: grid;
    flex: 1;
    gap: 4px;
    min-width: 0;
}

.folder-access-copy strong {
    color: #101828;
    font-size: 14px;
    font-weight: 700;
}

.folder-access-copy small {
    color: #7b879b;
    font-size: 12px;
    line-height: 1.45;
}

.folder-access-radio {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 2px solid #c9d1de;
    border-radius: 50%;
    background: #ffffff;
}

.folder-access-option > input:checked
    + .folder-access-card
    .folder-access-radio {
    border-color: #3168e8;
}

.folder-access-option > input:checked
    + .folder-access-card
    .folder-access-radio::after {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #3168e8;
    content: "";
}

.folder-access-parent-note {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 20px;
    padding: 14px;
    border: 1px solid #f3d4c7;
    border-radius: 14px;
    background: #fff9f6;
}

.folder-access-parent-note .folder-access-note-icon {
    color: #d65f27;
    background: #ffeadf;
}

.folder-access-parent-note > span:last-child {
    display: grid;
    gap: 4px;
}

.folder-access-parent-note strong {
    color: #1d2939;
    font-size: 14px;
}

.folder-access-parent-note small {
    color: #7b879b;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 560px) {
    .folder-access-card {
        align-items: flex-start;
    }

    .folder-access-radio {
        margin-top: 10px;
    }
}

/* Fixed sidebar with scrollable folder list */
.drive-body {
    height: 100vh;
    overflow: hidden;
}

.drive-app {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar-folder-section {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-folder-list {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 4px;
}

.sidebar-folder-list a {
    flex: 0 0 39px;
    min-width: 0;
}

.sidebar-folder-list a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-folder-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd3df transparent;
}

.sidebar-folder-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar-folder-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-folder-list::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #cbd3df;
}

.workspace {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

.workspace-layout {
    min-height: 0;
    overflow: hidden;
}

.content {
    overflow-x: hidden;
    overflow-y: auto;
}

@media (max-width: 840px) {
    .sidebar {
        position: fixed;
    }
}

/* Theme switch */
.theme-toggle {
    width: 100%;
    height: 39px;
    flex: 0 0 39px;
    margin-top: 3px;
    padding: 0 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #697286;
    display: flex;
    align-items: center;
    gap: 11px;
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
}

.theme-toggle:hover {
    color: var(--ink);
    background: #f6f7fa;
}

.theme-toggle-icon {
    width: 18px;
    height: 18px;
    flex: none;
    display: grid;
    place-items: center;
}

.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle-label {
    flex: 1;
}

.theme-switch {
    position: relative;
    width: 31px;
    height: 18px;
    flex: none;
    border: 1px solid #cbd3df;
    border-radius: 20px;
    background: #e4e8ef;
    transition: 160ms ease;
}

.theme-switch span {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
    transition: transform 160ms ease;
}

.theme-toggle[aria-pressed="true"] {
    color: #3168e8;
}

.theme-toggle[aria-pressed="true"] .theme-switch {
    border-color: #3168e8;
    background: #3168e8;
}

.theme-toggle[aria-pressed="true"] .theme-switch span {
    transform: translateX(13px);
}

/* Dark mode */
html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] .drive-body {
    --ink: #edf2fa;
    --muted: #8d99aa;
    --line: #273142;
    background: #0d131d;
    color: #edf2fa;
}

html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .detail-panel {
    background: #111822;
    border-color: #273142;
}

html[data-theme="dark"] .workspace,
html[data-theme="dark"] .content,
html[data-theme="dark"] .locked-content {
    background: #0d131d;
}

html[data-theme="dark"] .search-form {
    color: #7f8b9d;
    background: #192230;
}

html[data-theme="dark"] .search-form input {
    color: #edf2fa;
}

html[data-theme="dark"] .sidebar-nav a,
html[data-theme="dark"] .theme-toggle {
    color: #9aa6b8;
}

html[data-theme="dark"] .sidebar-nav a:hover,
html[data-theme="dark"] .theme-toggle:hover {
    color: #f2f5fa;
    background: #192230;
}

html[data-theme="dark"] .sidebar-nav a.active {
    color: #78a0ff;
    background: #1a2945;
}

html[data-theme="dark"] .nav-divider,
html[data-theme="dark"] .sidebar-account,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .detail-header,
html[data-theme="dark"] .detail-title,
html[data-theme="dark"] .detail-actions,
html[data-theme="dark"] .detail-info,
html[data-theme="dark"] .restricted-access-section {
    border-color: #273142;
}

html[data-theme="dark"] .item-card,
html[data-theme="dark"] .quick-card,
html[data-theme="dark"] .items-list,
html[data-theme="dark"] .list-row,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .folder-access-card,
html[data-theme="dark"] .restricted-access-icon {
    color: #edf2fa;
    border-color: #293446;
    background: #151d29;
}

html[data-theme="dark"] .item-card:hover,
html[data-theme="dark"] .quick-card:hover,
html[data-theme="dark"] .list-row:hover {
    border-color: #3b4b63;
    background: #192331;
    box-shadow: none;
}

html[data-theme="dark"] .list-header {
    color: #7f8b9d;
    border-color: #293446;
    background: #111822;
}

html[data-theme="dark"] .list-row {
    border-bottom-color: #232d3d;
}

html[data-theme="dark"] .list-name,
html[data-theme="dark"] .item-copy strong,
html[data-theme="dark"] .quick-card strong,
html[data-theme="dark"] .section-heading h2,
html[data-theme="dark"] .page-heading h1,
html[data-theme="dark"] .detail-header h3,
html[data-theme="dark"] .detail-title strong,
html[data-theme="dark"] .locked-page-heading h1,
html[data-theme="dark"] .restricted-access-copy h2 {
    color: #edf2fa;
}

html[data-theme="dark"] .page-heading p,
html[data-theme="dark"] .section-heading p,
html[data-theme="dark"] .item-copy small,
html[data-theme="dark"] .quick-card small,
html[data-theme="dark"] .detail-info,
html[data-theme="dark"] .locked-page-heading p,
html[data-theme="dark"] .restricted-access-copy p {
    color: #8d99aa;
}

html[data-theme="dark"] .button-secondary,
html[data-theme="dark"] .icon-button {
    color: #a7b2c2;
    border-color: #303b4d;
}

html[data-theme="dark"] .button-secondary {
    background: #151d29;
}

html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .button-secondary:hover {
    color: #edf2fa;
    background: #1c2634;
}

html[data-theme="dark"] .modal-backdrop {
    background: rgba(3, 7, 12, 0.76);
}

html[data-theme="dark"] .form-label {
    color: #b4bfce;
}

html[data-theme="dark"] .form-label input,
html[data-theme="dark"] .form-label select {
    color: #edf2fa;
    border-color: #344055;
    background: #101721;
}

html[data-theme="dark"] .form-label input::placeholder {
    color: #667386;
}

html[data-theme="dark"] .folder-access-option:hover .folder-access-card {
    border-color: #3a4960;
    background: #192331;
}

html[data-theme="dark"]
.folder-access-option > input:checked + .folder-access-card {
    border-color: #5c86ef;
    background: #192744;
    box-shadow: 0 0 0 3px rgba(92, 134, 239, 0.12);
}

html[data-theme="dark"] .folder-access-copy strong {
    color: #edf2fa;
}

html[data-theme="dark"] .folder-access-copy small {
    color: #8d99aa;
}

html[data-theme="dark"] .folder-access-parent-note {
    border-color: #553a30;
    background: #211a18;
}

html[data-theme="dark"] .folder-access-parent-note strong {
    color: #edf2fa;
}

html[data-theme="dark"] .detail-empty > span,
html[data-theme="dark"] .empty-state > span {
    background: #1a2945;
}

html[data-theme="dark"] .restricted-access-label {
    color: #aeb9c8;
    border-color: #364256;
    background: #151d29;
}

html[data-theme="dark"] .restricted-access-icon {
    color: #aeb9c8;
}

html[data-theme="dark"] .restricted-back-link,
html[data-theme="dark"] .locked-breadcrumbs a,
html[data-theme="dark"] .locked-breadcrumbs span {
    color: #9aa6b8;
}

html[data-theme="dark"] .theme-switch {
    border-color: #3a4658;
    background: #313b4b;
}

/* Unified file and folder grid */
.folder-card-unified {
    min-width: 0;
    overflow: hidden;
}

.folder-preview {
    height: 156px;
    min-height: 156px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3269e8;
    background: #f3f5f8;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    transition:
        background-color 140ms ease,
        color 140ms ease;
}

.folder-preview:hover {
    color: #2459d0;
    background: #edf1f7;
}

.folder-preview-icon {
    width: 62px;
    height: 62px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.folder-preview-label {
    position: absolute;
    left: 16px;
    bottom: 13px;
    color: #7a8598;
    font-size: 11px;
    font-weight: 500;
}

.folder-card-unified .file-meta {
    min-height: 62px;
}

.folder-card-copy {
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.folder-card-copy strong,
.folder-card-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Unified list columns */
.list-layout-unified {
    display: grid !important;
    grid-template-columns:
        minmax(240px, 1fr)
        minmax(120px, 170px)
        minmax(140px, 190px)
        minmax(80px, 110px)
        36px;
    align-items: center;
    column-gap: 16px;
}

.list-header.list-layout-unified {
    min-height: 45px;
}

.list-row.list-layout-unified {
    position: relative;
    width: 100%;
    min-height: 62px;
    padding: 9px 14px;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    text-align: left;
}

.list-row.list-layout-unified:last-child {
    border-bottom: 0;
}

.list-row.list-layout-unified:hover {
    background: #f7f9fc;
}

.list-layout-unified > span {
    min-width: 0;
}

.list-layout-unified .list-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-layout-unified .list-name strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-list-row {
    cursor: pointer;
}

.folder-row-open {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.folder-list-row > span {
    position: relative;
    pointer-events: none;
}

.list-more-button,
.list-locked-indicator {
    position: relative;
    z-index: 2;
    justify-self: end;
}

.list-more-button {
    opacity: 0;
    transition:
        opacity 140ms ease,
        background-color 140ms ease;
}

.folder-list-row:hover .list-more-button,
.list-more-button:focus-visible {
    opacity: 1;
}

.list-inline-more {
    display: grid;
    place-items: center;
    color: #7b8698;
}

.list-inline-more .icon,
.list-locked-indicator .icon {
    width: 17px;
    height: 17px;
}

/* Dark mode */
html[data-theme="dark"] .folder-preview {
    color: #78a0ff;
    background: #111822;
    border-color: #293446;
}

html[data-theme="dark"] .folder-preview:hover {
    color: #91afff;
    background: #182231;
}

html[data-theme="dark"] .folder-preview-label {
    color: #8d99aa;
}

html[data-theme="dark"] .list-row.list-layout-unified:hover {
    background: #192331;
}

/* Responsive list */
@media (max-width: 1050px) {
    .list-layout-unified {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(130px, 170px)
            minmax(80px, 110px)
            36px;
    }

    .list-layout-unified > :nth-child(2) {
        display: none;
    }
}

@media (max-width: 760px) {
    .folder-preview,
    .file-preview {
        height: 140px;
        min-height: 140px;
    }

    .list-layout-unified {
        grid-template-columns:
            minmax(180px, 1fr)
            minmax(75px, 100px)
            36px;
        column-gap: 10px;
    }

    .list-layout-unified > :nth-child(2),
    .list-layout-unified > :nth-child(3) {
        display: none;
    }

    .list-more-button {
        opacity: 1;
    }
}

/* Final alignment fix: grid and list */
.items-grid {
    align-items: start;
}

/* Semua kartu grid memiliki ukuran yang sama */
.items-grid .item-card,
.items-grid .folder-card-unified {
    width: 100%;
    height: 208px !important;
    min-height: 208px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: hidden;
}

/* Preview file dan folder dibuat sama tinggi */
.items-grid .file-preview,
.items-grid .folder-preview {
    width: 100% !important;
    height: 146px !important;
    min-height: 146px !important;
    flex: 0 0 146px !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

/* Folder tidak lagi menjadi kartu horizontal */
.items-grid .folder-preview {
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    color: #3269e8;
    background: #f2f4f7;
    border-bottom: 1px solid var(--line);
}

.items-grid .folder-preview-icon {
    width: 50px !important;
    height: 50px !important;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
}

.items-grid .folder-preview-label {
    position: static !important;
    color: #7b8698;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
}

/* Footer semua kartu dibuat sama */
.items-grid .file-meta,
.items-grid .folder-card-unified .file-meta {
    width: 100% !important;
    height: 62px !important;
    min-height: 62px !important;
    flex: 0 0 62px !important;
    padding: 10px 12px !important;
    box-sizing: border-box;
}

/* Teks kartu tidak terlalu besar */
.items-grid .item-copy strong,
.items-grid .folder-card-copy strong {
    font-size: 11px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
}

.items-grid .item-copy small,
.items-grid .folder-card-copy small {
    margin-top: 3px;
    font-size: 9px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

/* Judul di preview dokumen */
.items-grid .file-preview > strong {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

/* List dibuat compact dan konsisten */
.items-list .list-header.list-layout-unified {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    font-size: 9px !important;
    font-weight: 500 !important;
}

.items-list .list-row.list-layout-unified {
    height: 62px !important;
    min-height: 62px !important;
    padding: 0 16px !important;
    box-sizing: border-box;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
}

.items-list .list-row.list-layout-unified > span {
    color: #69758a;
    font-size: 11px !important;
    font-weight: 400 !important;
}

.items-list .list-row.list-layout-unified .list-name strong {
    color: var(--ink);
    font-size: 11px !important;
    font-weight: 650 !important;
    line-height: 1.3 !important;
}

.items-list .list-row.list-layout-unified .type-icon {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
}

.items-list .list-more-button,
.items-list .list-inline-more {
    width: 32px;
    height: 32px;
}

/* Dark mode */
html[data-theme="dark"] .items-grid .folder-preview {
    color: #78a0ff;
    background: #151d29;
    border-color: #293446;
}

html[data-theme="dark"] .items-list .list-row.list-layout-unified > span {
    color: #9aa6b8;
}

html[data-theme="dark"] .items-list .list-row.list-layout-unified .list-name strong {
    color: #edf2fa;
}

@media (max-width: 760px) {
    .items-grid .item-card,
    .items-grid .folder-card-unified {
        height: 190px !important;
        min-height: 190px !important;
    }

    .items-grid .file-preview,
    .items-grid .folder-preview {
        height: 128px !important;
        min-height: 128px !important;
        flex-basis: 128px !important;
    }
}

/* Sidebar folder tree */
.sidebar-folder-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-folder-list {
    min-height: 0;
    max-height: 280px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 3px 3px 5px 0;
    scrollbar-width: thin;
    scrollbar-color: #cbd3df transparent;
}

.sidebar-folder-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar-folder-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-folder-list::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #cbd3df;
}

.sidebar-tree-node {
    min-width: 0;
}

.sidebar-tree-row {
    min-width: 0;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding-left: calc(var(--tree-level) * 14px);
}

.sidebar-tree-toggle,
.sidebar-tree-spacer {
    width: 23px;
    height: 34px;
    flex: 0 0 23px;
}

.sidebar-tree-toggle {
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #8a95a6;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.sidebar-tree-toggle:hover {
    color: #3d4a5e;
    background: #f0f3f7;
}

.sidebar-tree-toggle .icon {
    width: 13px;
    height: 13px;
    transition: transform 150ms ease;
}

.sidebar-tree-toggle[aria-expanded="true"] .icon {
    transform: rotate(90deg);
}

.sidebar-nav .sidebar-tree-link {
    height: 36px;
    min-width: 0;
    flex: 1;
    padding: 0 9px;
    border-radius: 7px;
    color: #5f6b7e;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    font-weight: 450;
    text-decoration: none;
}

.sidebar-nav .sidebar-tree-link:hover {
    color: #17233a;
    background: #f5f7fa;
}

.sidebar-nav .sidebar-tree-link.active {
    color: #2862e6;
    background: #eaf0ff;
    font-weight: 650;
}

.sidebar-tree-folder-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
}

.sidebar-tree-link > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dark mode */
html[data-theme="dark"] .sidebar-folder-list {
    scrollbar-color: #3a4658 transparent;
}

html[data-theme="dark"] .sidebar-folder-list::-webkit-scrollbar-thumb {
    background: #3a4658;
}

html[data-theme="dark"] .sidebar-tree-toggle {
    color: #778396;
}

html[data-theme="dark"] .sidebar-tree-toggle:hover {
    color: #d5dce7;
    background: #1c2634;
}

html[data-theme="dark"] .sidebar-nav .sidebar-tree-link {
    color: #9aa6b8;
}

html[data-theme="dark"] .sidebar-nav .sidebar-tree-link:hover {
    color: #edf2fa;
    background: #192331;
}

html[data-theme="dark"] .sidebar-nav .sidebar-tree-link.active {
    color: #78a0ff;
    background: #1a2945;
}

/* Editorial folder card */
.items-grid .folder-card-editorial {
    width: 100%;
    height: 208px !important;
    min-height: 208px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #ffffff;
}

.folder-cover-editorial {
    position: relative;
    width: 100%;
    height: 146px;
    min-height: 146px;
    flex: 0 0 146px;
    padding: 23px 22px 20px;
    border-top: 3px solid #3168e8;
    box-sizing: border-box;
    color: #102044;
    background: #edf3ff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    overflow: hidden;
    transition: background-color 150ms ease;
}

.folder-cover-editorial:hover {
    background: #e5edff;
}

.folder-cover-editorial::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -37px;
    width: 128px;
    height: 128px;
    border: 1px solid rgba(49, 104, 232, 0.14);
    transform: rotate(18deg);
    pointer-events: none;
}

.folder-cover-type {
    position: relative;
    z-index: 1;
    color: #3168e8;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.1em;
}

.folder-cover-name {
    position: relative;
    z-index: 1;
    max-width: 82%;
    margin-top: 17px;
    color: #102044;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.25;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.folder-cover-count {
    position: relative;
    z-index: 1;
    margin-top: auto;
    color: #65738d;
    font-size: 10px;
    font-weight: 450;
}

.folder-card-footer {
    width: 100%;
    height: 62px;
    min-height: 62px;
    flex: 0 0 62px;
    padding: 10px 12px 10px 15px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.folder-card-information {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.folder-card-information > span {
    overflow: hidden;
    color: #354258;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-card-information > small {
    overflow: hidden;
    color: #909aad;
    font-size: 9px;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder-card-footer .item-more {
    flex: 0 0 auto;
}

/* Restricted folder */
.folder-card-editorial:has(.folder-cover-type:first-child) {
    box-shadow: none;
}

/* Dark mode */
html[data-theme="dark"] .items-grid .folder-card-editorial {
    border-color: #293446;
    background: #111822;
}

html[data-theme="dark"] .folder-cover-editorial {
    color: #edf2fa;
    border-top-color: #78a0ff;
    background: #17233a;
}

html[data-theme="dark"] .folder-cover-editorial:hover {
    background: #1b2943;
}

html[data-theme="dark"] .folder-cover-editorial::after {
    border-color: rgba(120, 160, 255, 0.16);
}

html[data-theme="dark"] .folder-cover-type {
    color: #78a0ff;
}

html[data-theme="dark"] .folder-cover-name {
    color: #edf2fa;
}

html[data-theme="dark"] .folder-cover-count {
    color: #9aa6b8;
}

html[data-theme="dark"] .folder-card-footer {
    border-color: #293446;
    background: #111822;
}

html[data-theme="dark"] .folder-card-information > span {
    color: #dce3ed;
}

html[data-theme="dark"] .folder-card-information > small {
    color: #8d99aa;
}

@media (max-width: 760px) {
    .items-grid .folder-card-editorial {
        height: 190px !important;
        min-height: 190px !important;
    }

    .folder-cover-editorial {
        height: 128px;
        min-height: 128px;
        flex-basis: 128px;
        padding: 19px 18px 17px;
    }

    .folder-cover-name {
        margin-top: 13px;
        font-size: 14px;
    }
}

/* Folder sidebar menggunakan seluruh ruang yang tersedia */
.sidebar-nav {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-folder-section {
    min-height: 100px;
    flex: 1 1 auto;
    overflow: hidden;
}

.sidebar-folder-list {
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Jaga ukuran menu utama sidebar agar tidak ikut menyusut */
.sidebar-nav > a,
.sidebar-nav > button,
.sidebar-nav > .theme-toggle {
    flex: 0 0 auto;
    flex-shrink: 0;
}

.sidebar-nav > a {
    min-height: 42px;
}

/* Divider dan label folder tidak boleh menyusut */
.sidebar-nav > .nav-divider,
.sidebar-nav > .nav-label,
.sidebar-folder-section > .nav-divider,
.sidebar-folder-section > .nav-label {
    flex: 0 0 auto;
    flex-shrink: 0;
}

/* Hanya daftar folder yang memakai sisa ruang dan bisa di-scroll */
.sidebar-folder-section {
    min-height: 0;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-folder-list {
    min-height: 0;
    max-height: none;
    flex: 1 1 0;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Baris folder juga tidak boleh berubah tinggi */
.sidebar-tree-row {
    min-height: 38px;
    flex: 0 0 38px;
}

/* Fix folder list pada tablet */
@media (max-width: 1050px) {
    /*
     * Struktur folder memiliki link overlay sebagai anak pertama,
     * sehingga posisi kolomnya berbeda dari baris file.
     */
    .folder-list-row > :nth-child(2) {
        display: flex !important;
    }

    .folder-list-row > :nth-child(3) {
        display: none !important;
    }
}

/* Fix folder list pada mobile */
@media (max-width: 760px) {
    .items-list .list-layout-unified {
        grid-template-columns:
            minmax(0, 1fr)
            72px
            32px !important;
        column-gap: 8px !important;
    }

    /* Nama folder wajib tampil */
    .folder-list-row > :nth-child(2) {
        display: flex !important;
        grid-column: 1;
    }

    /* Pemilik dan waktu disembunyikan pada mobile */
    .folder-list-row > :nth-child(3),
    .folder-list-row > :nth-child(4) {
        display: none !important;
    }

    /* Jumlah item */
    .folder-list-row > :nth-child(5) {
        display: block !important;
        grid-column: 2;
    }

    /* Tombol tiga titik */
    .folder-list-row > :nth-child(6) {
        display: grid !important;
        grid-column: 3;
    }

    .folder-list-row .list-name {
        min-width: 0;
        gap: 9px;
    }

    .folder-list-row .list-name strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .folder-list-row .type-icon {
        display: grid !important;
        flex: 0 0 32px !important;
    }

    .folder-list-row .list-more-button {
        opacity: 1;
    }
}

/* =========================================================
   FULLSCREEN FILE PREVIEW
   ========================================================= */

/*
 * Tombol layar penuh pada preview kecil
 */
.detail-preview.has-fullscreen-preview {
    position: relative;
    overflow: hidden;
}

.detail-preview-fullscreen {
    position: absolute;
    z-index: 8;
    right: 10px;
    bottom: 10px;

    min-height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 7px;

    color: #ffffff;
    background: rgba(9, 16, 29, 0.78);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    opacity: 0;
    transform: translateY(3px);

    transition:
        opacity 150ms ease,
        transform 150ms ease,
        background-color 150ms ease;
}

.detail-preview-fullscreen > span:first-child {
    font-size: 15px;
    line-height: 1;
}

.detail-preview.has-fullscreen-preview:hover
.detail-preview-fullscreen,
.detail-preview-fullscreen:focus-visible {
    opacity: 1;
    transform: translateY(0);
}

.detail-preview-fullscreen:hover {
    background: rgba(22, 34, 55, 0.94);
}

.detail-preview-fullscreen:focus-visible {
    outline: 2px solid #7da2ff;
    outline-offset: 2px;
}

/*
 * Viewer utama yang menutupi seluruh halaman
 */
.fullscreen-viewer {
    position: fixed;
    z-index: 10000;
    inset: 0;

    width: 100vw;
    height: 100vh;
    height: 100dvh;

    color: #ffffff;
    background: #0a0f18;

    display: grid;
    grid-template-rows: 64px minmax(0, 1fr);

    overflow: hidden;
}

.fullscreen-viewer[hidden] {
    display: none !important;
}

/*
 * Header viewer
 */
.fullscreen-viewer-header {
    min-width: 0;
    padding: 0 20px 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    background: rgba(13, 20, 32, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.fullscreen-viewer-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fullscreen-viewer-title > span {
    color: #789eff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.12em;
}

.fullscreen-viewer-title > strong {
    max-width: min(700px, 70vw);
    overflow: hidden;

    color: #f6f8fc;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;

    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
 * Tombol tutup
 */
.fullscreen-viewer-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;

    color: #dce3ef;
    background: rgba(255, 255, 255, 0.06);

    display: grid;
    place-items: center;

    cursor: pointer;

    transition:
        color 150ms ease,
        border-color 150ms ease,
        background-color 150ms ease;
}

.fullscreen-viewer-close:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
}

.fullscreen-viewer-close:focus-visible {
    outline: 2px solid #789eff;
    outline-offset: 2px;
}

.fullscreen-viewer-close .icon {
    width: 18px;
    height: 18px;
}

/*
 * Area isi preview
 */
.fullscreen-viewer-content {
    position: relative;
    min-width: 0;
    min-height: 0;

    padding: 16px;
    box-sizing: border-box;

    background:
        radial-gradient(
            circle at center,
            rgba(47, 64, 94, 0.22),
            transparent 58%
        ),
        #080c13;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

/*
 * Gambar layar penuh
 */
.fullscreen-viewer-content > img {
    display: block;

    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    border-radius: 4px;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
}

/*
 * Video layar penuh
 */
.fullscreen-viewer-content > video {
    display: block;

    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    border-radius: 5px;
    background: #000000;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.42);
}

/*
 * PDF layar penuh
 */
.fullscreen-viewer-content > iframe {
    display: block;

    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;

    border: 0;
    border-radius: 6px;

    background: #ffffff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.4);
}

/*
 * Tombol layar penuh harus tetap terlihat
 * pada perangkat yang tidak memiliki hover.
 */
@media (hover: none) {
    .detail-preview-fullscreen {
        opacity: 1;
        transform: none;
    }
}

/*
 * Tablet dan mobile
 */
@media (max-width: 760px) {
    .fullscreen-viewer {
        grid-template-rows: 56px minmax(0, 1fr);
    }

    .fullscreen-viewer-header {
        padding: 0 11px 0 15px;
        gap: 12px;
    }

    .fullscreen-viewer-title {
        gap: 4px;
    }

    .fullscreen-viewer-title > strong {
        max-width: calc(100vw - 85px);
        font-size: 12px;
    }

    .fullscreen-viewer-close {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .fullscreen-viewer-content {
        padding: 8px;
    }

    .fullscreen-viewer-content > iframe {
        border-radius: 3px;
    }

    .detail-preview-fullscreen {
        right: 8px;
        bottom: 8px;
        opacity: 1;
        transform: none;
    }
}

/* =========================================================
   PUBLIC SHARE PAGE
   ========================================================= */

.public-share-page {
    min-height: 100vh;
    margin: 0;
    color: #111a2e;
    background:
        radial-gradient(
            circle at top right,
            rgba(47, 99, 224, 0.09),
            transparent 34%
        ),
        #f5f7fb;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.public-share-page *,
.public-share-page *::before,
.public-share-page *::after {
    box-sizing: border-box;
}

.public-share-header {
    position: sticky;
    z-index: 20;
    top: 0;
    width: 100%;
    min-height: 72px;
    padding: 12px clamp(20px, 4vw, 58px);
    border-bottom: 1px solid #e2e7f0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.public-share-brand {
    min-width: 0;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.public-share-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 11px;
    color: #ffffff;
    background: #285fe1;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 8px 22px rgba(40, 95, 225, 0.2);
}

.public-share-brand > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.public-share-brand strong {
    color: #101a30;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
}

.public-share-brand small {
    overflow: hidden;
    color: #8993a7;
    font-size: 10px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-share-readonly {
    padding: 7px 11px;
    border: 1px solid #d9e1ee;
    border-radius: 7px;
    color: #667187;
    background: #f8faff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.public-share-main {
    width: 100%;
    padding: 44px clamp(18px, 4vw, 58px) 70px;
}

.public-share-container {
    width: min(100%, 1120px);
    margin: 0 auto;
}

.public-share-breadcrumb {
    min-height: 30px;
    margin-bottom: 21px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    color: #96a0b3;
    font-size: 11px;
    scrollbar-width: none;
}

.public-share-breadcrumb::-webkit-scrollbar {
    display: none;
}

.public-share-breadcrumb a,
.public-share-breadcrumb strong {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-share-breadcrumb a {
    color: #6d7890;
    text-decoration: none;
}

.public-share-breadcrumb a:hover {
    color: #285fe1;
}

.public-share-breadcrumb strong {
    color: #26334a;
    font-weight: 650;
}

.public-share-heading {
    min-height: 112px;
    margin-bottom: 22px;
    padding: 24px 27px;
    border: 1px solid #dfe5ef;
    border-top: 3px solid #285fe1;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 30px rgba(20, 36, 68, 0.05);
}

.public-share-eyebrow {
    color: #285fe1;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.public-share-heading h1,
.public-share-file h1 {
    margin: 10px 0 5px;
    color: #101a30;
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 740;
    line-height: 1.15;
    word-break: break-word;
}

.public-share-heading p,
.public-share-file > p {
    margin: 0;
    color: #8a95a9;
    font-size: 11px;
}

.public-share-list {
    overflow: hidden;
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 9px 32px rgba(20, 36, 68, 0.045);
}

.public-share-item {
    min-height: 74px;
    padding: 12px 16px;
    border-bottom: 1px solid #e8ecf3;
    display: flex;
    align-items: center;
    gap: 18px;
}

.public-share-item:last-child {
    border-bottom: 0;
}

.public-share-item:hover {
    background: #fafbfe;
}

.public-share-item-main {
    min-width: 0;
    flex: 1;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.public-share-item-main > span:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.public-share-item-main strong {
    overflow: hidden;
    color: #1a263e;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-share-item-main small {
    color: #929caf;
    font-size: 10px;
}

.public-share-item-icon {
    width: 39px;
    height: 39px;
    flex: 0 0 39px;
    border-radius: 9px;
    background: #f1f4f9;
    display: grid;
    place-items: center;
    font-size: 17px;
}

.public-share-item-icon.folder {
    background: #edf3ff;
}

.public-share-open,
.public-share-item-actions a,
.public-share-file-actions a {
    min-height: 35px;
    padding: 0 14px;
    border: 1px solid #dbe2ed;
    border-radius: 7px;
    color: #4f5d75;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition:
        border-color 150ms ease,
        color 150ms ease,
        background-color 150ms ease;
}

.public-share-open:hover,
.public-share-item-actions a:hover,
.public-share-file-actions a:hover {
    border-color: #b9c8e8;
    color: #285fe1;
    background: #f7f9ff;
}

.public-share-item-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-share-item-actions a.primary,
.public-share-file-actions a.primary {
    border-color: #285fe1;
    color: #ffffff;
    background: #285fe1;
}

.public-share-item-actions a.primary:hover,
.public-share-file-actions a.primary:hover {
    border-color: #1f53cf;
    color: #ffffff;
    background: #1f53cf;
}

.public-share-empty {
    min-height: 300px;
    padding: 50px 24px;
    border: 1px solid #dfe5ef;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.public-share-empty > span {
    font-size: 31px;
}

.public-share-empty h2 {
    margin: 15px 0 5px;
    color: #1c2940;
    font-size: 16px;
}

.public-share-empty p {
    margin: 0;
    color: #929caf;
    font-size: 11px;
}

.public-share-file {
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid #dfe5ef;
    border-top: 3px solid #285fe1;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 10px 34px rgba(20, 36, 68, 0.055);
}

.public-share-preview {
    width: 100%;
    min-height: 420px;
    max-height: 72vh;
    margin-top: 27px;
    overflow: hidden;
    border: 1px solid #dfe5ef;
    border-radius: 9px;
    background: #f0f2f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.public-share-preview img,
.public-share-preview video,
.public-share-preview iframe {
    width: 100%;
    height: min(68vh, 720px);
    border: 0;
}

.public-share-preview img {
    object-fit: contain;
}

.public-share-preview video {
    background: #111827;
    object-fit: contain;
}

.public-share-file-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.public-share-file-actions a {
    min-height: 41px;
    padding: 0 18px;
}

.public-share-footer {
    margin-top: 20px;
    padding: 16px 3px;
    color: #929caf;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 9px;
    line-height: 1.5;
}

@media (max-width: 680px) {
    .public-share-header {
        min-height: 64px;
        padding: 10px 16px;
    }

    .public-share-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .public-share-brand small {
        max-width: 180px;
    }

    .public-share-main {
        padding: 26px 14px 45px;
    }

    .public-share-heading {
        min-height: 98px;
        padding: 20px;
    }

    .public-share-heading h1,
    .public-share-file h1 {
        font-size: 23px;
    }

    .public-share-item {
        min-height: 70px;
        padding: 11px 12px;
        gap: 10px;
    }

    .public-share-item-actions {
        gap: 5px;
    }

    .public-share-item-actions a {
        min-height: 32px;
        padding: 0 9px;
        font-size: 9px;
    }

    .public-share-open {
        min-height: 32px;
        padding: 0 10px;
        font-size: 9px;
    }

    .public-share-preview {
        min-height: 300px;
    }

    .public-share-preview img,
    .public-share-preview video,
    .public-share-preview iframe {
        height: 55vh;
    }

    .public-share-file-actions {
        flex-direction: column;
    }

    .public-share-file-actions a {
        width: 100%;
    }

    .public-share-footer {
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 430px) {
    .public-share-readonly {
        display: none;
    }

    .public-share-brand small {
        max-width: 150px;
    }

    .public-share-item-main strong {
        max-width: 155px;
    }

    .public-share-item-actions a:not(.primary) {
        display: none;
    }
}