:root{--bg: #eef2f7;--surface: #ffffff;--surface-soft: #f8fafc;--text: #172033;--text-muted: #667085;--primary: #1769e0;--primary-hover: #0f57bd;--primary-soft: #eaf2ff;--danger: #c93c4a;--danger-soft: #fff0f1;--success: #17845b;--border: #d9e0ea;--border-strong: #c4cedb;--shadow: 0 12px 32px rgba(30, 45, 70, .12)}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{width:100%;height:100%;font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:var(--text);background:var(--bg)}button,select,textarea{font:inherit}button{min-height:38px;padding:8px 13px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text);cursor:pointer;font-size:13px;font-weight:650;transition:border-color .14s ease,background .14s ease,transform 80ms ease}button:hover:not(:disabled){border-color:#9daabd;background:var(--surface-soft)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{cursor:not-allowed;opacity:.5}button.primary{border-color:var(--primary);background:var(--primary);color:#fff}button.primary:hover:not(:disabled){border-color:var(--primary-hover);background:var(--primary-hover)}button.danger-ghost{border-color:#efc0c5;background:var(--danger-soft);color:var(--danger)}button.text-button{min-height:auto;padding:4px;border:none;background:transparent;color:var(--text-muted);font-size:12px}button.text-button:hover:not(:disabled){border:none;background:transparent;color:var(--primary)}select{width:100%;height:40px;padding:0 10px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text);font-size:13px}textarea{width:100%;min-height:72px;padding:8px 10px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text);font-size:12px;line-height:1.45;resize:vertical}textarea:disabled{opacity:.6}select:focus,button:focus-visible,textarea:focus{outline:3px solid rgba(23,105,224,.18);outline-offset:1px}.app{display:grid;grid-template-columns:360px minmax(0,1fr);grid-template-rows:68px minmax(0,1fr);width:100%;height:100vh;overflow:hidden}.topbar{grid-column:1 / -1;display:flex;align-items:center;gap:11px;padding:0 22px;border-bottom:1px solid var(--border);background:#fffffff5;box-shadow:0 2px 10px #1e2d460a;z-index:10}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,#1769e0,#4d92f2);color:#fff;font-size:17px;font-weight:800;box-shadow:0 6px 16px #1769e03d}.topbar h1{font-size:15px;line-height:1.2}.topbar-subtitle{display:block;margin-top:2px;color:var(--text-muted);font-size:10px;font-weight:700;letter-spacing:.08em}.topbar .spacer{flex:1}.user-menu{display:flex;align-items:center;gap:6px;min-width:0;margin-left:8px;padding-left:14px;border-left:1px solid var(--border)}.user-email{max-width:220px;overflow:hidden;color:var(--text-muted);font-size:12px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.auth-loading{display:grid;place-items:center;height:100vh;color:var(--text-muted);font-size:13px}.login-screen{display:grid;place-items:center;min-height:100vh;padding:24px}.login-card{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;max-width:380px;padding:32px 28px;border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:var(--shadow);text-align:center}.login-card h1{font-size:19px}.login-card .error{width:100%}.login-providers{display:flex;flex-direction:column;gap:10px;width:100%;margin-top:8px}.login-button{display:flex;align-items:center;justify-content:center;min-height:42px;border:1px solid var(--border-strong);border-radius:9px;background:var(--surface);color:var(--text);font-size:14px;font-weight:650;text-decoration:none;transition:border-color .14s ease,background .14s ease}.login-button:hover{border-color:#9daabd;background:var(--surface-soft)}.login-button.provider-yandex{border-color:#fc3f1d;background:#fc3f1d;color:#fff}.login-button.provider-yandex:hover{border-color:#e0330f;background:#e0330f}.sidebar{min-height:0;padding:16px;border-right:1px solid var(--border);background:#f6f8fb;overflow-y:auto}.sidebar>*+*{margin-top:13px}.control-card{padding:14px;border:1px solid var(--border);border-radius:13px;background:var(--surface);box-shadow:0 2px 8px #1e2d4609}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;color:var(--text);font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.section-heading>span:last-child:not(.step-badge){color:var(--text-muted);font-size:10px;font-weight:600;text-transform:none}.step-badge{display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:var(--primary-soft);color:var(--primary);font-size:11px}.muted{color:var(--text-muted);font-size:12px;line-height:1.5}.button-row{display:flex;gap:8px;margin-top:12px}.button-row button{flex:1}.file-summary{display:flex;align-items:center;gap:10px;min-width:0}.file-icon{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:10px;background:var(--primary-soft);color:var(--primary);font-size:10px;font-weight:850;letter-spacing:.05em}.file-meta{display:flex;min-width:0;flex-direction:column;gap:3px}.file-meta strong{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.file-meta span{color:var(--text-muted);font-size:11px}.language-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.field{display:flex;flex-direction:column;gap:5px}.field label{color:var(--text-muted);font-size:10px;font-weight:750;letter-spacing:.04em;text-transform:uppercase}.field-hint{color:var(--text-muted);font-size:10px;line-height:1.4}.translation-modes{display:grid;grid-template-columns:1fr 1fr;gap:8px}button.mode-card{display:flex;min-height:82px;padding:11px;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:5px;text-align:left}button.mode-card strong{font-size:12px}button.mode-card span{color:var(--text-muted);font-size:10px;font-weight:500;line-height:1.35}button.mode-card.active{border-color:var(--primary);background:var(--primary-soft);box-shadow:inset 0 0 0 1px var(--primary)}button.mode-card.active strong,button.mode-card.active span{color:#0e4f9f}.action-button{width:100%;min-height:44px;margin-top:12px}.translation-progress{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:10px;margin-top:10px;padding:10px;border:1px solid #c7d8f2;border-radius:10px;background:#f4f8ff}.progress-spinner{display:grid;place-items:center;width:48px;height:48px;border:3px solid rgba(23,105,224,.18);border-top-color:var(--primary);border-radius:50%;animation:spin .85s linear infinite}.progress-spinner span{color:#104f9f;font-size:10px;font-weight:850;animation:spin .85s linear infinite reverse}.progress-copy{min-width:0}.progress-copy strong,.progress-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.progress-copy strong{color:#104f9f;font-size:12px}.progress-copy span{margin-top:2px;color:var(--text-muted);font-size:10px}button.cancel-button{min-height:32px;padding:5px 9px;border-color:#efc0c5;background:#fff;color:var(--danger);font-size:10px}.selection-action{margin-top:12px;text-align:center}.selection-action .action-button{margin-top:8px}.selection-summary{display:flex;justify-content:space-between;padding:8px 10px;border-radius:8px;background:var(--surface-soft);color:var(--text-muted);font-size:11px}.error{padding:11px 12px;border:1px solid #efb8be;border-radius:10px;background:var(--danger-soft);color:#a62d39;font-size:12px;line-height:1.45}.history-list{display:flex;flex-direction:column}.history-item{position:relative;display:flex;min-height:48px;align-items:center;gap:9px;padding:7px 0}.history-item+.history-item{border-top:1px solid #edf0f5}.history-index{display:grid;place-items:center;flex:0 0 auto;width:24px;height:24px;border-radius:50%;background:#edf2f8;color:#536176;font-size:10px;font-weight:800}.history-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:3px}.history-copy strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.history-copy span,.history-status{color:var(--text-muted);font-size:10px}.history-item.rolled-back .history-copy,.history-item.rolled-back .history-index{opacity:.52}.history-item.rolled-back .history-copy strong{text-decoration:line-through}.status-dot{width:8px;height:8px;border-radius:50%}.status-dot.active{background:var(--success);box-shadow:0 0 0 3px #17845b1f}button.undo-button{min-height:29px;padding:4px 8px;border-color:#cdd6e2;color:#4f6077;font-size:10px}.canvas-area{min-width:0;min-height:0;display:flex;padding:24px 32px 48px;flex-direction:column;align-items:center;gap:26px;overflow:auto;background-color:var(--bg);background-image:radial-gradient(#d5dce6 .7px,transparent .7px);background-size:18px 18px}.upload-zone{width:min(620px,90%);margin:auto;padding:64px 32px;border:2px dashed #b7c4d5;border-radius:18px;background:#ffffffc7;text-align:center;cursor:pointer;box-shadow:0 12px 40px #1e2d460f;transition:border-color .15s ease,background .15s ease,transform .15s ease}.upload-zone:hover,.upload-zone.dragging{border-color:var(--primary);background:#f7faff;transform:translateY(-2px)}.upload-icon{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 16px;border-radius:16px;background:var(--primary-soft);color:var(--primary);font-size:26px;font-weight:700}.upload-zone h2{margin-bottom:7px;font-size:20px}.upload-zone p{color:var(--text-muted);font-size:13px}.upload-zone>span{display:block;margin-top:9px;color:#8b97a8;font-size:11px}.workspace-hint{position:sticky;top:0;z-index:4;display:flex;width:min(720px,100%);padding:10px 13px;border:1px solid var(--border);border-radius:11px;background:#fffffff0;box-shadow:0 6px 18px #1e2d4614;flex-direction:column;gap:2px}.workspace-hint strong{font-size:12px}.workspace-hint span{color:var(--text-muted);font-size:11px}.page-wrapper{flex:0 0 auto}.page-label{margin-bottom:7px;color:#627087;font-size:11px;font-weight:750;text-align:center;text-transform:uppercase}.page-card{position:relative;overflow:hidden;background:#fff;box-shadow:var(--shadow)}.html-page-card{overflow:hidden;outline:2px solid rgba(23,105,224,.45);outline-offset:-2px}.html-page-frame{display:block;border:none;pointer-events:none}.processing-overlay{position:absolute;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid rgba(23,105,224,.65);background:#edf5ffe0;color:#104f9f;font-size:12px;font-weight:750;pointer-events:none;z-index:5}.spinner{width:17px;height:17px;border:2px solid rgba(23,105,224,.22);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 1050px){.app{grid-template-columns:320px minmax(0,1fr)}.canvas-area{align-items:flex-start}}
