.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border-soft); position: sticky; top: 0; z-index: 5; }
.search { flex: 1; max-width: 560px; position: relative; }
.search svg { position: absolute; left: 10px; top: 8px; color: var(--text-3); }
.search .input { width: 100%; padding-left: 34px; height: 34px; border-radius: 17px; background: var(--surface-2); }
.avatar-btn { border: none; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.home { max-width: 1120px; margin: 0 auto; padding: 24px 24px 64px; }
.home h2 { font-size: 15px; font-weight: 600; margin: 8px 0 14px; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 16px; margin-bottom: 32px; }
.tpl { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); cursor: pointer; overflow: hidden; text-align: left; padding: 0; transition: box-shadow 0.15s, border-color 0.15s; }
.tpl:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tpl .thumb { height: 104px; background: #fff; border-bottom: 1px solid var(--border-soft); display: grid; place-items: center; overflow: hidden; }
.tpl .thumb svg { width: 100%; height: 100%; }
.tpl .meta { padding: 10px 12px; }
.tpl .meta b { display: block; font-weight: 600; font-size: 13px; }
.tpl .meta span { font-size: 12px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; }
.drop { position: relative; border-radius: var(--radius); }
.drop .drop-hint { display: none; }
.drop.over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.drop.over .drop-hint { display: grid; place-items: center; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 88%, transparent); font-weight: 600; color: var(--accent-text); }
.wb-list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.wb-list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--border-soft); }
.wb-list td { padding: 9px 14px; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
.wb-list tr:last-child td { border-bottom: none; }
.wb-list tbody tr { cursor: pointer; }
.wb-list tbody tr:hover { background: var(--surface-2); }
.wb-list .name { display: flex; align-items: center; gap: 10px; font-weight: 500; white-space: normal; }
.wb-list .name svg { color: var(--accent); width: 20px; height: 20px; }
.wb-list td:last-child { width: 44px; }
.empty { text-align: center; padding: 40px; color: var(--text-2); }

.auth-page { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; min-height: 100vh; padding: 16px; }
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); text-align: center; }
.auth-foot a { color: var(--text-2); text-decoration: none; }
.auth-foot a:hover { color: var(--accent-text); text-decoration: underline; }
.auth-card { width: 380px; max-width: 100%; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 32px; box-shadow: var(--shadow-sm); }

@media (max-width: 720px) {
  .topbar { padding: 0 16px; }
  .home { padding: 16px; }
  .wb-list th:nth-child(2), .wb-list td:nth-child(2), .wb-list th:nth-child(4), .wb-list td:nth-child(4) { display: none; }
}

/* PDF home: tools and document cards */
.hero-drop { border: 2px dashed var(--border); border-radius: 12px; padding: 26px; display: flex; align-items: center; gap: 22px; background: var(--surface); margin-bottom: 28px; flex-wrap: wrap; }
.hero-drop.over { border-color: var(--accent); background: var(--accent-soft); }
.hero-drop .big { width: 56px; height: 56px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.hero-drop .big svg { width: 30px; height: 30px; }
.hero-drop .txt { flex: 1; min-width: 220px; }
.hero-drop .txt b { font-size: 16px; display: block; margin-bottom: 2px; }
.hero-drop .txt span { color: var(--text-2); font-size: 13px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 32px; }
.tool-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tool-card .ic { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; }
.tool-card .ic svg { width: 19px; height: 19px; stroke-width: 1.8; }
.tool-card b { display: block; font-size: 13.5px; font-weight: 600; }
.tool-card span { font-size: 12px; color: var(--text-2); }
.view-toggle { display: flex; gap: 2px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.dcard { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; cursor: pointer; position: relative; }
.dcard:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.dcard .cv { aspect-ratio: 3 / 3.4; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--border-soft); }
.dcard .cv canvas { max-width: 86%; max-height: 90%; box-shadow: 0 1px 4px rgba(0,0,0,.2); background: #fff; }
.dcard .cv svg { width: 40px; height: 40px; color: var(--text-3); }
.dcard .meta { padding: 9px 11px; }
.dcard .meta b { display: block; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard .meta span { font-size: 12px; color: var(--text-2); }
.dcard .more { position: absolute; top: 6px; right: 6px; background: var(--surface); border-radius: 50%; box-shadow: var(--shadow-sm); opacity: 0; }
.dcard:hover .more { opacity: 1; }
.search-results { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 24px; }
.search-results a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--border-soft); color: inherit; text-decoration: none; }
.search-results a:hover { background: var(--surface-2); }
.search-results small { display: block; color: var(--text-2); }
.privacy-note { font-size: 12px; color: var(--text-3); margin-top: 28px; text-align: center; }
