/* Вход и список файлов */

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 480px) 1fr; }
.auth-card { background: #fff; padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; gap: 18px; box-shadow: 1px 0 0 var(--line); }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.auth-name { font-size: 22px; font-weight: 700; }
.auth-card h1 { font-size: 24px; margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .btn { height: 40px; font-size: 15px; }
.auth-switch { color: var(--muted); }
.auth-demo { font-size: 13px; font-weight: 550; text-decoration: none; }
.auth-demo:hover { text-decoration: underline; }
.auth-aside { position: relative; overflow: hidden; background: linear-gradient(135deg, #312e81, #4f46e5 55%, #6366f1); color: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.aside-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px); background-size: 96px 26px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.aside-list { position: relative; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; font-size: 18px; max-width: 460px; }
.aside-list li { padding-left: 34px; position: relative; }
.aside-list li::before { content: "Σ"; position: absolute; left: 0; top: -1px; width: 24px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); display: flex; align-items: center; justify-content: center; font: 700 15px/24px Georgia, serif; text-align: center; }
@media (max-width: 820px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { padding: 32px 22px; }
}

/* файлы */
.topbar { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--line); }
.tb-spacer { flex: 1; }
.files-top .search { max-width: 360px; height: 36px; background: #f3f4f6; border-color: transparent; }
.files-top .search:focus { background: #fff; }
.files-main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 60px; }
.files-main h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
.files-create { margin-bottom: 30px; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.tpl-card { text-align: left; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
.tpl-card:hover { border-color: var(--accent-200); box-shadow: 0 6px 18px rgba(79, 70, 229, 0.12); transform: translateY(-1px); }
.tpl-thumb { height: 92px; border-radius: 8px; background: #f7f7fb; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; color: var(--accent); position: relative; overflow: hidden;
  background-image: linear-gradient(#e6e8ee 1px, transparent 1px), linear-gradient(90deg, #e6e8ee 1px, transparent 1px); background-size: 34px 13px; }
.tpl-thumb svg { width: 34px; height: 34px; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.tpl-budget::after, .tpl-todo::after, .tpl-invoice::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 13px; background: var(--accent-100); }
.tpl-budget::before { content: ""; position: absolute; right: 12px; bottom: 10px; width: 70px; height: 40px; background: linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 15px, #f97316 15px 25px, transparent 25px 30px, var(--accent) 30px 40px, transparent 40px 45px, #f97316 45px 55px, transparent 55px) bottom / 100% 100% no-repeat; clip-path: polygon(0 40%, 14% 40%, 14% 60%, 21% 60%, 21% 10%, 36% 10%, 36% 45%, 43% 45%, 43% 25%, 57% 25%, 57% 70%, 64% 70%, 64% 0, 79% 0, 79% 100%, 0 100%); }
.tpl-todo::before { content: "✓  ✓  ·"; position: absolute; left: 10px; top: 22px; color: var(--ok); font-weight: 700; letter-spacing: 2px; }
.tpl-invoice::before { content: "₴"; position: absolute; right: 14px; bottom: 6px; font: 700 34px/1 Georgia, serif; color: var(--accent); opacity: 0.8; }
.tpl-upload { background: #fafafc; }
.tpl-title { font-weight: 600; }
.tpl-desc { color: var(--muted); font-size: 12.5px; }
.files-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.files-head h2 { margin: 0; }
.seg { display: inline-flex; background: #eceef2; border-radius: 9px; padding: 3px; gap: 2px; }
.seg-btn { border: 0; background: none; padding: 5px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 550; color: #4b5160; }
.seg-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.book-list { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.book-row { display: grid; grid-template-columns: 1fr 180px 150px 40px; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #eef0f3; text-decoration: none; color: var(--text); }
.book-row:last-child { border-bottom: 0; }
a.book-row:hover { background: #f8f8fb; }
.book-head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 12px; background: #fafbfc; }
.book-name { display: flex; align-items: center; min-width: 0; }
.book-icon { color: var(--accent); margin-right: 10px; display: inline-flex; }
.book-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
@media (max-width: 640px) {
  .book-row { grid-template-columns: 1fr 40px; }
  .files-top .search { display: none; }
}
