:root {
  font-family: "Vazirmatn", "Segoe UI", Tahoma, Arial, sans-serif;
  color: #202b3c;
  background: #f3f5fa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #202b3c;
  --muted: #8793a6;
  --line: #e9edf4;
  --blue: #5469e8;
  --blue-dark: #3f55d2;
  --blue-pale: #eef1ff;
  --surface: #fff;
  --soft: #f8f9fc;
  --teal: #2aa89b;
  --red: #dd5e6b;
  --shadow: 0 16px 48px rgba(36, 50, 82, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(ellipse at 35% 0%, #f7f8fc 0, #f1f4fa 55%, #edf1f8 100%); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .56; cursor: wait; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(84,105,232,.24); outline-offset: 2px; }
.app-root { min-height: 100vh; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg,#7487ff,#4f61de); color: #fff; font-size: 25px; font-weight: 800; box-shadow: 0 8px 18px rgba(82,100,223,.23); }
.boot-screen { height: 100vh; display: flex; align-items: center; justify-content: center; gap: 13px; color: #8490a4; font-size: 14px; }
.eyebrow { color: #7e8ba1; font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.hidden { display: none !important; }

/* Private sign-in and first-run setup */
.gate-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(300px,1fr) minmax(420px,650px); background: #f8f9fd; direction: ltr; }
.gate-art { min-height: 620px; position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg,#eef1ff 0%,#e3eafa 50%,#eff6fa 100%); }
.gate-art::before, .gate-art::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.48); }
.gate-art::before { width: 410px; height: 410px; left: -85px; top: -120px; }
.gate-art::after { width: 300px; height: 300px; right: -70px; bottom: -125px; }
.art-orbit { position: absolute; border: 1px solid rgba(94,111,208,.12); border-radius: 50%; transform: rotate(-22deg); }
.orbit-one { width: 540px; height: 265px; }
.orbit-two { width: 660px; height: 360px; }
.art-window { z-index: 1; width: min(500px,75%); height: 330px; overflow: hidden; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: rgba(255,255,255,.89); box-shadow: 0 32px 72px rgba(77,91,157,.16); transform: perspective(900px) rotateY(-6deg) rotateX(2deg); }
.art-window-bar { height: 39px; display: flex; align-items: center; gap: 6px; padding: 0 15px; border-bottom: 1px solid #edf0f7; }
.art-window-bar i { width: 7px; height: 7px; border-radius: 50%; background: #d7ddeb; }
.art-window-bar i:first-child { background: #7185f4; }
.art-window-body { height: calc(100% - 39px); display: flex; }
.art-side { width: 118px; border-left: 1px solid #edf0f7; background: #fafbfe; }
.art-files { flex: 1; padding: 24px; display: grid; grid-template-columns: repeat(2,1fr); gap: 13px; }
.art-files b { height: 92px; position: relative; border: 1px solid #eef0f7; border-radius: 10px; background: linear-gradient(145deg,#fff,#f4f6ff); }
.art-files b::before { content: ""; position: absolute; top: 17px; right: 15px; width: 30px; height: 23px; border-radius: 5px 8px 4px 4px; background: #e7ebff; }
.art-files b:nth-child(2)::before { background: #e5f5f1; }
.art-files b:nth-child(3)::before { background: #fff1df; }
.art-files b:nth-child(4)::before { background: #f9e9ee; }
.art-caption { z-index: 1; position: absolute; bottom: 12%; display: flex; align-items: center; gap: 9px; color: #66728a; font-size: 13px; }
.tiny-shield { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #fff; color: #596ee2; }
.gate-panel { width: min(100%,590px); margin: auto; padding: 62px 64px; display: flex; flex-direction: column; justify-content: center; direction: rtl; }
.gate-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 62px; }
.gate-brand strong { display: block; color: #2c3950; font-size: 19px; font-weight: 800; }
.gate-brand small { display: block; margin-top: 3px; color: #929db0; font-size: 11px; }
.gate-copy h1 { margin: 8px 0 9px; color: #26334a; font-size: 28px; line-height: 1.5; }
.gate-copy p { margin: 0 0 27px; color: #8490a3; font-size: 13px; line-height: 2; }
.gate-form { display: grid; gap: 17px; }
.gate-form label, .dialog-form label { color: #47556d; font-size: 12px; font-weight: 600; }
.field-with-icon { height: 48px; margin-top: 8px; padding: 0 13px; display: flex; align-items: center; gap: 10px; border: 1px solid #e2e7f0; border-radius: 11px; background: #fff; transition: border .2s,box-shadow .2s; }
.field-with-icon:focus-within { border-color: #8c9af3; box-shadow: 0 0 0 4px rgba(84,105,232,.08); }
.field-with-icon > span { display: flex; color: #97a2b5; }
.field-with-icon input { min-width: 0; flex: 1; border: 0; outline: 0 !important; background: transparent; color: #2a3650; font-size: 13px; }
.field-with-icon input::placeholder { color: #b0b8c6; }
.primary-button { padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; background: linear-gradient(135deg,#6075ef,#4e63dc); color: #fff; box-shadow: 0 7px 18px rgba(80,99,219,.18); font-size: 12px; font-weight: 700; transition: transform .18s,box-shadow .18s,background .18s; }
.primary-button:hover { transform: translateY(-1px); background: linear-gradient(135deg,#687cf3,#465bce); box-shadow: 0 10px 23px rgba(80,99,219,.25); }
.full-button { width: 100%; height: 48px; margin-top: 5px; }
.full-button > span { display: flex; }
.form-message { display: none; margin: 0; color: #d05763; font-size: 12px; line-height: 1.8; }
.form-message.is-visible { display: block; }
.gate-foot { margin-top: 31px; padding-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e9edf4; color: #9aa4b5; font-size: 10px; }
.gate-foot span { display: flex; align-items: center; gap: 6px; }
.gate-foot span:first-child { color: #73809a; }
.gate-foot b { padding: 0 4px; color: #c6cdda; }

/* Windows-inspired private archive desktop */
.desktop-shell { height: 100vh; min-height: 620px; padding: 16px 18px 0; display: flex; flex-direction: column; gap: 11px; }
.topbar { height: 58px; flex: 0 0 58px; padding: 0 19px; display: flex; align-items: center; gap: 24px; border: 1px solid rgba(229,233,242,.9); border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 5px 21px rgba(46,61,99,.035); }
.brand-mini { width: 195px; display: flex; align-items: center; gap: 10px; }
.mini-mark { width: 34px; height: 34px; border-radius: 11px; font-size: 19px; }
.brand-mini b { display: block; color: #26334a; font-size: 13px; }
.brand-mini small { display: block; margin-top: 2px; color: #98a2b3; font-size: 9px; }
.topbar-center { flex: 1; display: flex; align-items: center; gap: 8px; color: #8c97a9; font-size: 10px; }
.topbar-status-dot, .status-dot, .taskbar-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #38b99d; box-shadow: 0 0 0 3px rgba(56,185,157,.1); }
.topbar-divider { width: 1px; height: 14px; margin: 0 5px; background: #e5e9f1; }
.topbar-user { display: flex; align-items: center; gap: 9px; }
.avatar-button { width: 34px; height: 34px; border: 1px solid #dfe4f2; border-radius: 50%; background: #eef1ff; color: #5367db; font-size: 13px; font-weight: 800; }
.user-meta strong, .user-meta span { display: block; }
.user-meta strong { color: #46536b; font-size: 11px; }
.user-meta span { margin-top: 3px; color: #a1aabc; font-size: 9px; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #94a0b2; transition: background .18s,color .18s; }
.icon-button:hover { background: #f1f3fa; color: #5469e8; }
.top-logout { margin-right: 7px; padding-right: 11px; border-right: 1px solid #edf0f5; border-radius: 0; }
.app-frame { flex: 1; min-height: 0; display: grid; grid-template-columns: 218px minmax(380px,1fr) 307px; overflow: hidden; border: 1px solid #e3e8f0; border-radius: 17px; background: var(--surface); box-shadow: var(--shadow); direction: rtl; }
.sidebar { grid-column: 1; min-height: 0; padding: 18px 13px 14px; display: flex; flex-direction: column; border-left: 1px solid #edf0f5; background: #fcfcfe; }
.new-item-button { width: 100%; height: 41px; padding: 0 11px; display: flex; align-items: center; gap: 9px; border: 1px solid #e3e7f1; border-radius: 10px; background: #fff; color: #5263cf; box-shadow: 0 3px 10px rgba(44,57,89,.04); font-size: 11px; }
.new-item-button > span { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: #eef1ff; }
.new-item-button b { font-size: 11px; font-weight: 700; }
.new-item-button small { margin-right: auto; color: #acb5c4; }
.nav-heading { padding: 21px 10px 8px; color: #a1aabb; font-size: 9px; font-weight: 700; }
.nav-heading-gap { padding-top: 20px; }
.main-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item { height: 37px; padding: 0 10px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 9px; background: transparent; color: #78859b; text-align: right; font-size: 11px; transition: background .17s,color .17s; }
.nav-item:hover { background: #f3f5fb; color: #495b80; }
.nav-item.active { background: #eff1ff; color: #5366dc; font-weight: 700; }
.nav-icon { width: 21px; display: flex; align-items: center; justify-content: center; color: #8996aa; }
.nav-item.active .nav-icon { color: #5b6fe1; }
.type-image { color: #7b88ec; }
.type-video { color: #b27bcf; }
.type-audio { color: #50a99d; }
.type-document { color: #de9b4b; }
.type-archive { color: #8290a9; }
.type-trash { color: #c48991; }
.nav-count { margin-right: auto; color: #adb5c2; font-size: 9px; }
.sidebar-bottom { margin-top: auto; }
.storage-card { padding: 12px 11px; border: 1px solid #edf0f5; border-radius: 11px; background: #fff; }
.storage-card-top, .storage-summary { display: flex; align-items: center; justify-content: space-between; color: #9aa5b7; font-size: 9px; }
.storage-card-top svg { color: #8290eb; }
.storage-summary { margin-top: 11px; }
.storage-summary span:first-child { color: #64728b; font-weight: 700; }
.privacy-note { padding: 12px 4px 0; display: flex; align-items: center; gap: 6px; color: #9da7b8; font-size: 9px; }
.privacy-note svg { flex-shrink: 0; color: #54a697; }
.content-area { grid-column: 2; min-width: 0; padding: 24px 24px 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.content-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.content-heading h1 { margin: 4px 0 5px; color: #29364d; font-size: 21px; line-height: 1.4; font-weight: 700; }
.heading-tools { display: flex; align-items: center; gap: 8px; }
.secondary-button { height: 35px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid #e4e8f1; border-radius: 9px; background: #fff; color: #66738c; font-size: 10px; font-weight: 600; }
.secondary-button svg { color: #6075e7; }
.secondary-button:hover { border-color: #cdd4f4; background: #f8f9ff; }
.subtle-icon { background: #f7f8fb; }
.breadcrumb { min-height: 18px; display: flex; align-items: center; gap: 6px; color: #9aa4b5; font-size: 9px; }
.crumb-root, .crumb-button { padding: 0; display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: #8e99aa; font-size: 9px; }
.crumb-root:hover, .crumb-button:hover { color: #5268dd; }
.crumb-sep { color: #ccd2dd; }
.command-bar { height: 49px; flex: 0 0 49px; margin-top: 16px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid #edf0f5; }
.search-box { width: min(300px,39%); height: 32px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 1px solid #e7eaf1; border-radius: 8px; background: #fafbfc; color: #9aa5b7; }
.search-box:focus-within { border-color: #bdc7f5; background: #fff; box-shadow: 0 0 0 3px rgba(84,105,232,.07); }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0 !important; background: transparent; color: #4d5970; font-size: 10px; }
.search-box input::placeholder { color: #adb6c4; }
.search-box kbd { padding: 2px 4px; border: 1px solid #e6e9f0; border-radius: 4px; color: #adb5c3; font: inherit; font-size: 9px; white-space: nowrap; }
.command-divider { width: 1px; height: 18px; background: #eceff5; }
.sort-control, .category-control { display: flex; align-items: center; gap: 6px; color: #a0aaba; font-size: 9px; white-space: nowrap; }
.sort-control select, .category-control select { max-width: 105px; border: 0; outline: 0; background: transparent; color: #67748c; font-size: 10px; }
.category-control { gap: 5px; }
.category-control select { max-width: 105px; text-overflow: ellipsis; }
.category-control select:focus-visible { outline: 2px solid rgba(84,105,232,.24) !important; outline-offset: 1px; border-radius: 4px; }
.sort-direction { width: 25px; height: 25px; color: #929eb1; font-size: 15px; }
.view-toggle { margin-right: auto; padding: 2px; display: flex; align-items: center; gap: 2px; border: 1px solid #eef0f4; border-radius: 7px; background: #f5f6fa; }
.view-mode { width: 25px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #9da7b6; }
.view-mode.active { background: #fff; color: #5268dc; box-shadow: 0 1px 4px rgba(33,45,74,.11); }
.file-pane { flex: 1; min-height: 0; padding-bottom: 12px; overflow: auto; position: relative; }
.table-header, .file-row { display: grid; grid-template-columns: minmax(170px,1fr) 95px 125px 65px 90px; align-items: center; gap: 10px; padding-right: 12px; padding-left: 12px; }
.table-header { height: 38px; border-bottom: 1px solid #f0f2f6; color: #a3adbb; font-size: 9px; }
.header-name { padding-right: 42px; }
.header-actions { visibility: hidden; }
.file-list { display: flex; flex-direction: column; }
.file-row { min-height: 55px; border-bottom: 1px solid #f1f3f7; color: #78859b; font-size: 10px; cursor: pointer; outline: none; transition: background .14s; }
.file-row:hover { background: #fafbff; }
.file-row.selected { background: #f1f3ff; box-shadow: inset -2px 0 #697cf0; }
.file-primary { min-width: 0; display: flex; align-items: center; gap: 11px; }
.file-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 9px; background: #f0f2ff; color: #7888ec; }
.file-icon-folder { background: #f1f3ff; color: #7082e8; }
.file-icon-image { background: #edf3ff; color: #6e86da; }
.file-icon-video { background: #f6effa; color: #a56bbd; }
.file-icon-audio { background: #ebf7f5; color: #44a798; }
.file-icon-document { background: #fff6e9; color: #d19a47; }
.file-icon-file { background: #f2f3f7; color: #929db0; }
.file-name-wrap { min-width: 0; }
.file-name-wrap b, .file-name-wrap small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name-wrap b { color: #48566e; font-size: 10px; font-weight: 600; }
.file-name-wrap small { margin-top: 4px; color: #a3adba; font-size: 8px; }
.file-category, .file-date, .file-size { overflow: hidden; color: #929daf; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1px; opacity: .08; transition: opacity .15s; }
.file-row:hover .row-actions, .file-row.selected .row-actions { opacity: 1; }
.row-action { width: 25px; height: 25px; display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #8793a6; font-size: 14px; }
.row-action:hover { background: #eef1ff; color: #586ce0; }
.row-delete:hover { background: #fff0f1; color: #d45b67; }
.restore-action { color: #49a294; font-size: 18px; }
.empty-state, .error-state, .loading-state { min-height: 250px; padding: 35px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #939eaf; font-size: 10px; text-align: center; }
.empty-state b, .error-state b { color: #59677e; font-size: 13px; }
.empty-state p { max-width: 280px; margin: 0 0 4px; line-height: 1.9; }
.empty-graphic { width: 82px; height: 68px; margin-bottom: 2px; display: grid; place-items: center; position: relative; color: #7b8bed; }
.empty-graphic span { width: 58px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #eef1ff; }
.empty-graphic i { width: 26px; height: 4px; position: absolute; top: 6px; right: 20px; border-radius: 3px; background: #bbc4f7; }
.empty-graphic i:last-child { width: 42px; top: auto; bottom: 1px; background: #dde2f8; }
.empty-state .primary-button { margin-top: 4px; }
.error-state .secondary-button { margin-top: 5px; }
.spinner { width: 21px; height: 21px; border: 2px solid #e5e9f2; border-top-color: #6479e8; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.file-list.grid-mode { padding: 12px; display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); align-content: start; gap: 10px; }
.grid-mode .file-row { min-height: 135px; padding: 13px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 11px; position: relative; border: 1px solid #edf0f5; border-radius: 12px; }
.grid-mode .file-primary { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.grid-mode .file-icon { width: 40px; height: 40px; flex-basis: 40px; }
.grid-mode .file-name-wrap { width: 100%; }
.grid-mode .file-category, .grid-mode .file-date { display: none; }
.grid-mode .file-size { font-size: 8px; }
.grid-mode .row-actions { position: absolute; top: 8px; left: 7px; }
.grid-mode .row-action { width: 22px; height: 22px; }
.drop-hint { display: none; position: absolute; inset: 6px; z-index: 3; place-items: center; border: 2px dashed #7b8deb; border-radius: 14px; background: rgba(241,243,255,.94); color: #586ddd; font-size: 14px; font-weight: 700; pointer-events: none; }
.drop-hint.visible { display: grid; }
.status-bar { height: 37px; flex: 0 0 37px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #eff1f5; color: #98a3b3; font-size: 9px; }
.status-bar > div:first-child { display: flex; align-items: center; gap: 7px; }
.status-dot { width: 6px; height: 6px; }
.status-separator { color: #c5ccd7; }
.status-security { display: flex; align-items: center; gap: 5px; color: #7aab9e; }
.status-security svg { color: #57a99b; }
.inspector { grid-column: 3; min-width: 0; padding: 20px 16px; overflow: auto; border-right: 1px solid #edf0f5; background: #fdfdff; }
.inspector-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #9ca6b6; text-align: center; }
.empty-selection-icon { width: 50px; height: 50px; margin-bottom: 3px; display: grid; place-items: center; border-radius: 15px; background: #f2f4fa; color: #9aa6b9; }
.inspector-empty b { color: #78859a; font-size: 11px; }
.inspector-empty span { max-width: 180px; font-size: 9px; line-height: 1.8; }
.inspector-head { margin-bottom: 13px; display: flex; align-items: center; justify-content: space-between; }
.inspector-head h2 { margin: 4px 0 0; color: #38465c; font-size: 15px; }
.inspector-close { width: 28px; height: 28px; }
.preview-card { height: 175px; position: relative; overflow: hidden; border: 1px solid #edf0f5; border-radius: 12px; background: linear-gradient(140deg,#f8f9fe,#f0f3fa); }
.preview-topline { z-index: 1; position: absolute; top: 9px; right: 10px; left: 10px; display: flex; align-items: center; justify-content: space-between; }
.preview-type, .preview-lock { padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,.83); color: #8a95a7; font-size: 8px; }
.preview-lock { display: flex; align-items: center; gap: 4px; color: #62a797; }
.preview-content { width: 100%; height: 100%; display: grid; place-items: center; }
.image-preview { width: 100%; height: 100%; padding: 26px 12px 10px; object-fit: contain; }
.media-preview { width: 100%; max-height: 100%; padding-top: 26px; background: #182237; }
.audio-preview-wrap { width: 92%; padding-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 13px; color: #60a99c; }
.audio-preview-wrap audio { width: 100%; height: 32px; }
.preview-illustration { height: 100%; padding-top: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #8390a4; }
.preview-illustration small { color: #a0aaba; font-size: 8px; }
.folder-illustration { color: #7585e3; }
.folder-illustration svg { fill: rgba(113,130,229,.1); }
.inspector-file-title { min-width: 0; margin: 13px 1px 12px; display: flex; align-items: center; gap: 10px; }
.inspector-file-title > div { min-width: 0; }
.inspector-file-title b, .inspector-file-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inspector-file-title b { color: #4a5870; font-size: 10px; }
.inspector-file-title small { margin-top: 4px; color: #9aa5b5; font-size: 8px; }
.detail-actions { padding-bottom: 15px; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #edf0f5; }
.detail-action { min-height: 29px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #e8ebf1; border-radius: 7px; background: #fff; color: #728097; font-size: 8px; text-decoration: none; }
.detail-action:hover { background: #f7f8fd; color: #596edc; }
.primary-detail { border-color: #e4e8ff; background: #f3f4ff; color: #5669db; }
.danger-detail { color: #c17d84; }
.detail-section { padding: 14px 0 4px; border-bottom: 1px solid #edf0f5; }
.section-title { margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: #66748b; font-size: 9px; }
.section-title b { white-space: nowrap; }
.section-line { height: 1px; flex: 1; background: #eff1f5; }
.metadata-list { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.metadata-list > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 8px; }
.metadata-list dt { color: #9ca6b5; }
.metadata-list dd { max-width: 65%; margin: 0; color: #637189; direction: rtl; text-align: left; }
.category-input-row { margin-bottom: 7px; display: flex; gap: 6px; }
.category-input-row input { min-width: 0; height: 31px; padding: 0 8px; flex: 1; border: 1px solid #e7eaf1; border-radius: 7px; outline: 0; background: #fff; color: #526078; font-size: 9px; }
.category-input-row input:focus { border-color: #aeb9f2; }
.tiny-save { padding: 0 9px; border: 0; border-radius: 7px; background: #f0f2ff; color: #5c70df; font-size: 9px; }
.notes-section { border: 0; }
.note-private { display: flex; align-items: center; gap: 4px; color: #a0abbb; font-size: 8px; white-space: nowrap; }
.note-private svg { color: #55a99b; }
.notes-section textarea { width: 100%; height: 76px; padding: 8px; resize: vertical; border: 1px solid #e8ebf2; border-radius: 8px; outline: 0; background: #fff; color: #536178; font-size: 9px; line-height: 1.9; }
.notes-section textarea:focus { border-color: #aebaf3; box-shadow: 0 0 0 3px rgba(84,105,232,.06); }
.notes-section textarea::placeholder { color: #b3bbc7; }
.note-actions { margin-top: 7px; display: flex; gap: 6px; }
.save-note { height: 29px; padding: 0 10px; box-shadow: none; font-size: 8px; }
.record-button { height: 29px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid #e6e9f1; border-radius: 7px; background: #fff; color: #708097; font-size: 8px; }
.record-button:hover { border-color: #f2c4c9; background: #fff8f8; color: #d15a66; }
.record-button.recording { border-color: #f2c2c7; background: #fff1f2; color: #ce4d5a; animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(217,77,91,.12); } }
.voice-note-player { margin-top: 8px; padding: 7px; border: 1px solid #edf0f5; border-radius: 8px; background: #fafbfe; }
.voice-note-label { margin-bottom: 5px; display: flex; align-items: center; gap: 5px; color: #6fa89d; font-size: 8px; }
.voice-note-player audio { width: 100%; height: 27px; }
.record-status { min-height: 14px; margin-top: 5px; color: #8c99ad; font-size: 8px; }

/* Windows-like bottom taskbar */
.taskbar { height: 42px; flex: 0 0 42px; padding: 0 14px; display: flex; align-items: center; border: 1px solid rgba(223,228,239,.9); border-bottom: 0; border-radius: 14px 14px 0 0; background: rgba(255,255,255,.74); color: #8793a5; font-size: 9px; }
.taskbar-left, .taskbar-right { flex: 1; display: flex; align-items: center; gap: 7px; }
.taskbar-right { justify-content: flex-end; }
.taskbar-left .taskbar-dot { width: 6px; height: 6px; }
.taskbar-sep { padding: 0 3px; color: #d3d9e3; }
.taskbar-center { height: 100%; padding: 0 13px; display: flex; align-items: center; gap: 7px; border-bottom: 2px solid #697cf0; color: #5869cf; }
.taskbar-app-icon { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: #edf0ff; color: #566bdc; font-size: 12px; font-weight: 800; }
.taskbar-app-label { font-size: 9px; }
.taskbar-right svg { color: #55aa9b; }
.taskbar-clock { direction: rtl; }

/* Dialogs and feedback */
.dialog-card { width: calc(100% - 30px); max-width: 420px; padding: 0; border: 1px solid #e7eaf2; border-radius: 16px; color: #344158; box-shadow: 0 24px 70px rgba(30,42,75,.2); }
.dialog-card::backdrop { background: rgba(27,38,63,.35); backdrop-filter: blur(3px); }
.dialog-form { padding: 28px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.dialog-form h2 { margin: 0 0 4px; font-size: 20px; }
.dialog-form label { display: flex; flex-direction: column; gap: 7px; }
.dialog-form input { height: 42px; padding: 0 10px; border: 1px solid #e3e7ef; border-radius: 9px; outline: 0; color: #344158; }
.dialog-form input:focus { border-color: #aeb9f2; }
.dialog-close { width: 29px; height: 29px; position: absolute; top: 16px; left: 16px; border: 0; border-radius: 8px; background: #f4f5f9; color: #8d98aa; font-size: 19px; }
.form-hint { margin: 0; color: #939eaf; font-size: 10px; }
.toast-region { z-index: 99; position: fixed; left: 22px; bottom: 61px; display: flex; flex-direction: column; gap: 8px; }
.toast { max-width: min(390px,calc(100vw - 35px)); padding: 11px 14px; border: 1px solid #e5e9f0; border-radius: 10px; background: #fff; color: #657188; box-shadow: 0 10px 28px rgba(34,47,78,.12); font-size: 11px; line-height: 1.7; animation: toast-in .18s ease-out; }
.toast-success { border-right: 3px solid #55b19e; }
.toast-error { border-right: 3px solid #df6975; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.danger-soft-button { height: 34px; padding: 0 10px; border: 1px solid #f2d9dd; border-radius: 8px; background: #fff7f7; color: #c6616c; font-size: 9px; }

@media (max-width: 1180px) {
  .app-frame { grid-template-columns: 195px minmax(340px,1fr) 280px; }
  .content-area { padding-right: 17px; padding-left: 17px; }
  .table-header, .file-row { grid-template-columns: minmax(150px,1fr) 76px 110px 55px 80px; gap: 7px; padding-right: 8px; padding-left: 8px; }
  .inspector { padding: 17px 13px; }
  .category-control span { display: none; }
  .category-control select { max-width: 80px; }
}
@media (max-width: 930px) {
  .desktop-shell { padding: 9px 9px 0; gap: 7px; }
  .app-frame { grid-template-columns: 182px minmax(300px,1fr); }
  .topbar { height: 51px; flex-basis: 51px; padding: 0 12px; }
  .brand-mini { width: 150px; }
  .content-area { grid-column: 2; }
  .table-header, .file-row { grid-template-columns: minmax(135px,1fr) 70px 95px 55px 75px; }
  .user-meta { display: none; }
  .inspector { z-index: 35; width: min(340px,calc(100vw - 24px)); position: fixed; top: 72px; bottom: 58px; left: 12px; right: auto; display: block; border: 1px solid #e3e8f0; border-radius: 15px; background: #fff; box-shadow: 0 20px 60px rgba(28,40,73,.2); transform: translateY(110%); opacity: 0; pointer-events: none; transition: transform .24s ease,opacity .2s ease; }
  .inspector.mobile-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
}
@media (max-width: 650px) {
  .desktop-shell { height: 100dvh; min-height: 540px; padding: 0; gap: 0; }
  .topbar { height: 48px; flex-basis: 48px; padding: 0 11px; gap: 10px; border-right: 0; border-left: 0; border-radius: 0; }
  .brand-mini { width: auto; }
  .brand-mini small, .topbar-center, .top-logout { display: none; }
  .app-frame { flex: 1; grid-template-columns: 1fr; grid-template-rows: minmax(0,1fr) 58px; border-right: 0; border-left: 0; border-radius: 0; }
  .sidebar { grid-row: 2; grid-column: 1; padding: 4px 7px; flex-direction: row; align-items: center; overflow: auto; border-top: 1px solid #edf0f5; border-left: 0; }
  .new-item-button, .nav-heading, .sidebar-bottom { display: none; }
  .main-nav { width: 100%; flex-direction: row; justify-content: space-around; gap: 2px; }
  .nav-item { min-width: 45px; height: 48px; padding: 3px 6px; display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 8px; white-space: nowrap; }
  .nav-item > span:nth-child(2) { font-size: 8px; }
  .nav-count { display: none; }
  .nav-icon { height: 18px; }
  .content-area { grid-row: 1; grid-column: 1; padding: 14px 12px 0; }
  .content-heading h1 { font-size: 18px; }
  .content-heading .eyebrow { font-size: 9px; }
  .heading-tools { gap: 4px; }
  .secondary-button { height: 32px; padding: 0 8px; font-size: 9px; }
  .subtle-icon { width: 30px; height: 30px; }
  .command-bar { height: 43px; flex-basis: 43px; margin-top: 10px; gap: 7px; }
  .search-box { width: auto; flex: 1; }
  .search-box kbd, .command-divider { display: none; }
  .sort-control { gap: 2px; font-size: 8px; }
  .sort-control select { max-width: 70px; font-size: 9px; }
  .sort-direction { width: 22px; }
  .category-control select { max-width: 70px; font-size: 8px; }
  .view-toggle { display: none; }
  .table-header, .file-row { grid-template-columns: minmax(110px,1fr) 70px 63px 0; gap: 4px; padding-right: 5px; padding-left: 5px; }
  .table-header { font-size: 8px; }
  .table-header span:nth-child(4), .file-row .file-size { display: none; }
  .file-row { min-height: 53px; }
  .file-row .file-primary { gap: 7px; }
  .file-row .file-icon { width: 29px; height: 29px; flex-basis: 29px; }
  .file-name-wrap b { font-size: 9px; }
  .file-name-wrap small { font-size: 7px; }
  .file-category, .file-date { font-size: 8px; }
  .row-actions { position: absolute; left: 3px; padding: 2px; border-radius: 6px; background: #fff; box-shadow: 0 2px 7px #ccd2df; }
  .row-action { width: 21px; height: 21px; }
  .file-list.grid-mode { padding: 8px; grid-template-columns: repeat(auto-fill,minmax(125px,1fr)); gap: 7px; }
  .grid-mode .file-row { min-height: 122px; padding: 10px; }
  .status-bar { height: 32px; flex-basis: 32px; font-size: 8px; }
  .status-security, .taskbar { display: none; }
  .inspector { top: 55px; right: 8px; bottom: 8px; left: 8px; width: auto; border-radius: 13px; }
  .gate-wrap { grid-template-columns: 1fr; direction: rtl; }
  .gate-art { display: none; }
  .gate-panel { width: min(100%,500px); min-height: 100vh; padding: 32px 25px; }
  .gate-brand { margin-bottom: 48px; }
  .gate-copy h1 { font-size: 24px; }
  .gate-foot { margin-top: 26px; }
  .toast-region { left: 10px; bottom: 12px; }
  .trash-table { grid-template-columns: minmax(110px,1fr) 70px 63px 0 !important; }
}
@media (max-height: 700px) and (min-width: 651px) {
  .desktop-shell { padding-top: 8px; gap: 6px; }
  .topbar { height: 48px; flex-basis: 48px; }
  .content-area { padding-top: 16px; }
  .command-bar { margin-top: 10px; }
  .inspector { padding-top: 13px; }
  .preview-card { height: 145px; }
  .detail-section { padding-top: 9px; }
  .gate-panel { padding-top: 35px; padding-bottom: 35px; }
  .gate-brand { margin-bottom: 35px; }
}

.load-more{min-height:36px;margin:14px auto 8px;padding:0 16px;display:block;border:1px solid #e3e8f3;border-radius:9px;background:#fafbff;color:#586bd7;font-size:10px;font-weight:600}.load-more:hover{border-color:#cdd5f1;background:#f2f4ff}

@media (max-height: 800px) and (min-width: 651px) {
  .gate-panel { padding: 28px 56px; }
  .gate-brand { margin-bottom: 32px; }
  .gate-copy h1 { font-size: 24px; line-height: 1.35; }
  .gate-copy p { margin-bottom: 18px; line-height: 1.7; }
  .gate-form { gap: 12px; }
  .field-with-icon { height: 42px; margin-top: 5px; }
  .full-button { height: 44px; margin-top: 1px; }
  .gate-foot { margin-top: 15px; padding-top: 11px; }
}
