:root {
  color-scheme: light;
  --blue: #07549a;
  --blue-dark: #083c6d;
  --blue-soft: #eaf3f9;
  --green: #4b9739;
  --text: #172934;
  --muted: #657682;
  --line: #e4eaf0;
  --surface: #ffffff;
  --canvas: #f8fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--text); }
button, input { font: inherit; }
button { cursor: pointer; }
.skip-link { position: absolute; left: -9999px; z-index: 10; padding: 12px; background: var(--blue); color: #fff; }
.skip-link:focus { left: 16px; top: 12px; }
.app-shell { min-height: 100vh; background: var(--canvas); }
.topbar { height: 82px; padding: 0 40px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 17px; min-width: 0; }
.brand-logo { height: 54px; width: 54px; object-fit: contain; flex: 0 0 auto; }
.brand-divider { height: 30px; border-left: 1px solid var(--line); }
.brand-name { display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.brand-name strong { font-size: 16px; font-weight: 730; color: var(--blue-dark); }
.brand-name span { font-size: 12px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.preview-badge { color: var(--blue-dark); background: var(--blue-soft); padding: 7px 12px; border-radius: 100px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.account-button { width: 38px; height: 38px; border: 1px solid #b7d7e9; border-radius: 50%; background: #fff; color: var(--blue-dark); font-size: 12px; font-weight: 750; }
.account-button:hover, .account-button:focus-visible { background: var(--blue-soft); }
.workspace { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: calc(100vh - 82px); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 32px 16px 22px; display: flex; flex-direction: column; }
.nav-list { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 13px; border: 0; background: transparent; color: #475865; border-radius: 9px; padding: 12px 15px; font-size: 14px; font-weight: 550; text-align: left; }
.nav-item:hover, .nav-item:focus-visible { background: #f2f6f8; }
.nav-item.active { color: var(--blue); background: var(--blue-soft); font-weight: 690; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 19px; font-size: 20px; font-family: Arial, sans-serif; font-weight: 400; }
.sidebar-note { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.55; color: var(--muted); }
.main-content { width: min(100%, 1330px); padding: 32px clamp(24px, 5vw, 72px) 80px; margin: 0 auto; }
.notice { min-height: 45px; display: flex; align-items: center; gap: 10px; padding: 10px 15px; border: 1px solid #d3e7f2; background: #f1f8fc; color: #305066; border-radius: 9px; font-size: 12px; line-height: 1.4; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: 0 0 auto; }
.auth-panel { margin-top: 35px; max-width: 560px; padding: 30px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.auth-panel[hidden], #app-content[hidden] { display: none; }
#users-panel[hidden], #invite-panel[hidden] { display: none; }
.nav-item[hidden] { display: none; }
.auth-panel fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 4px 0 16px; padding: 12px; max-height: 260px; overflow: auto; }
.auth-panel fieldset label { display: flex; align-items: center; gap: 8px; font-weight: 500; margin: 6px 0; }
.auth-panel fieldset input { width: auto; margin: 0; }
#invite-result { overflow-wrap: anywhere; }
.auth-panel p { color: var(--muted); line-height: 1.55; }
.auth-actions button { background: var(--blue); color: #fff; border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 650; }
.auth-actions button[hidden] { display: none; }
.auth-error { color: #a52323 !important; min-height: 1.5em; }
.auth-panel label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.auth-panel input { width: 100%; max-width: 360px; padding: 11px; border: 1px solid #c7d7df; border-radius: 8px; margin-bottom: 15px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 38px 0 24px; }
.eyebrow { margin: 0 0 9px; color: var(--green); text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; }
h1 { font-size: clamp(26px, 3.5vw, 38px); letter-spacing: -.045em; line-height: 1.17; margin: 0; font-weight: 750; }
.subtitle { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.volt-mark { width: 72px; height: 72px; border-radius: 20px; object-fit: cover; box-shadow: 0 0 0 1px rgba(3,61,107,.1); }
.search-section { margin: 20px 0 36px; }
.search-section[hidden] { display: none; }
.search-index-tools { display: flex; align-items: center; gap: 14px; margin-top: 13px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.search-index-tools[hidden] { display: none; }
.search-index-tools button { border: 1px solid #b7d7e9; border-radius: 8px; background: #fff; color: var(--blue-dark); padding: 8px 11px; font-weight: 650; }
.search-box { width: min(100%, 610px); height: 50px; display: flex; gap: 13px; align-items: center; padding: 0 14px 0 17px; background: #fff; border: 1px solid #d4e0e7; border-radius: 10px; color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px #dbeefa; }
.search-box > span { font-size: 27px; line-height: 1; }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.search-box input::placeholder { color: #7c8c95; }
.search-box kbd { border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: #90a0a9; font-size: 12px; }
.view { display: none; }
.view.active { display: block; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; margin: 0 0 18px; }
h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.section-count { font-size: 13px; color: var(--muted); }
.area-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.area-card { min-height: 117px; width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; padding: 19px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.area-card:hover, .area-card:focus-visible { border-color: #abcddd; transform: translateY(-2px); box-shadow: 0 7px 20px rgba(20,65,90,.06); }
.area-icon { flex: 0 0 auto; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-family: Arial, sans-serif; font-size: 25px; }
.area-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.area-text strong { font-size: 14px; font-weight: 680; line-height: 1.3; }
.area-text > span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.area-arrow { margin-left: auto; align-self: flex-start; color: #a5b4bc; font-size: 24px; line-height: 1; }
.no-results { color: var(--muted); padding: 32px 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.breadcrumbs button { border: 0; background: none; color: var(--blue); padding: 5px 0; font-weight: 600; }
.breadcrumbs > span:last-child { color: var(--text); font-weight: 600; }
.test-write-panel { margin: 0 0 18px; padding: 18px; border: 1px solid #b7d7e9; border-radius: 12px; background: #f5faff; }
.test-write-panel[hidden] { display: none; }
.test-write-panel h3 { margin: 0 0 6px; font-size: 16px; }
.test-write-panel p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.test-write-panel form { margin-top: 12px; }
.test-write-panel label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.test-write-row { display: flex; flex-wrap: wrap; gap: 8px; }
.test-write-row input { flex: 1; min-width: 180px; padding: 9px; border: 1px solid #c7d7df; border-radius: 8px; }
.test-write-row button { border: 0; border-radius: 8px; background: var(--blue); color: #fff; padding: 9px 14px; font-weight: 650; }
.test-write-panel #test-note-form { margin-top: 18px; padding-top: 16px; border-top: 1px solid #d6e5ee; }
.test-write-panel #test-note-name, .test-write-panel #test-note-content { display: block; width: 100%; max-width: 420px; padding: 9px; border: 1px solid #c7d7df; border-radius: 8px; margin-bottom: 12px; background: #fff; font: inherit; }
.test-write-panel #test-note-form button { border: 0; border-radius: 8px; background: var(--blue); color: #fff; padding: 9px 14px; font-weight: 650; }
.test-write-panel #test-write-result { margin-top: 12px; margin-bottom: 0; }
.test-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #d6e5ee; }
.test-actions select, .test-actions > input { display: block; width: 100%; max-width: 420px; padding: 9px; border: 1px solid #c7d7df; border-radius: 8px; margin-bottom: 12px; background: #fff; }
.test-actions .test-write-row { margin-top: 12px; }
.file-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.user-access-row { padding: 16px; border-bottom: 1px solid var(--line); }
.user-access-row:last-child { border-bottom: 0; }
.user-access-row > strong { display: block; margin-bottom: 12px; }
.user-access-row button { margin: 8px 8px 0 0; }
.user-access-areas { display: flex; flex-wrap: wrap; gap: 8px 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.user-access-areas label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.file-row { width: 100%; min-height: 65px; display: flex; align-items: center; gap: 14px; text-align: left; padding: 11px 20px; background: #fff; color: var(--text); border: 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
.file-row:hover, .file-row:focus-visible { background: #f7fafc; }
.file-row-icon { display: flex; justify-content: center; align-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-size: 20px; }
.file-row-name { font-size: 14px; font-weight: 620; flex: 1; }
.file-row-kind { color: var(--muted); font-size: 12px; }
.file-preview { width: min(920px, calc(100vw - 24px)); height: min(780px, calc(100dvh - 24px)); max-width: none; max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 70px #142b3955; }
.file-preview::backdrop { background: #10273399; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.preview-toolbar strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-toolbar div { display: flex; gap: 8px; flex-shrink: 0; }
.preview-toolbar button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.preview-content { display: grid; place-items: center; height: calc(100% - 69px); overflow: auto; padding: 12px; }
.preview-content img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview-content pre { width: 100%; height: 100%; overflow: auto; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, monospace; }
.file-row-arrow { color: #9dabb4; font-size: 23px; margin-left: 12px; }
.locked-panel, .empty-state { text-align: center; padding: 70px 20px; }
.locked-icon, .empty-icon { width: 64px; height: 64px; margin: 0 auto 22px; display: flex; justify-content: center; align-items: center; border-radius: 15px; background: var(--blue-soft); color: var(--blue); font-size: 30px; }
.locked-panel h2, .empty-state h2 { font-size: 19px; }
.locked-panel p, .empty-state p { max-width: 380px; margin: 11px auto 0; line-height: 1.5; color: var(--muted); font-size: 14px; }
.mobile-nav { display: none; }
@media (max-width: 1160px) { .area-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 760px) {
  .topbar { height: 72px; padding: 0 20px; }
  .workspace { display: block; min-height: calc(100vh - 72px); }
  .sidebar { display: none; }
  .main-content { padding: 20px 20px calc(102px + env(safe-area-inset-bottom)); }
  .preview-badge { display: none; }
  .page-heading { margin: 34px 0 24px; }
  .volt-mark { width: 57px; height: 57px; border-radius: 15px; }
  .mobile-nav { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; height: calc(68px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
  .mobile-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: transparent; color: #667884; font-size: 10px; font-weight: 600; }
  .mobile-item[hidden] { display: none; }
  .mobile-item span { font-family: Arial, sans-serif; font-size: 23px; line-height: 1.1; }
  .mobile-item.active { color: var(--blue); }
}
@media (max-width: 580px) {
  .topbar { padding: 0 16px; }
  .brand { gap: 10px; }
  .brand-logo { width: 43px; height: 43px; }
  .brand-divider { height: 25px; }
  .brand-name strong { font-size: 14px; }
  .brand-name span { font-size: 10px; }
  .topbar-actions { gap: 0; }
  .account-button { width: 34px; height: 34px; }
  .main-content { padding-left: 16px; padding-right: 16px; }
  .notice { font-size: 11px; }
  .area-grid { grid-template-columns: 1fr; gap: 9px; }
  .area-card { min-height: 84px; padding: 15px; }
  .area-icon { width: 42px; height: 42px; }
  .search-section { margin-bottom: 30px; }
  .file-row-kind { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
