#sf-app { all: initial; display: block; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.5; color: #1e293b; max-width: 480px; margin: 32px auto; }
#sf-app * { box-sizing: border-box; }
.sf-screen { display: none; }
.sf-screen.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.sf-card { background: #fff; border-radius: 24px; box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 20px 60px rgba(0,0,0,.10); overflow: hidden; }
.sf-login-wrap { padding: 40px 36px 36px; }
.sf-login-logo { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg,#6366f1,#8b5cf6); display: flex; align-items: center; justify-content: center; font-size: 26px; margin: 0 auto 20px; box-shadow: 0 8px 20px rgba(99,102,241,.35); color: #fff;}
.sf-login-title { text-align: center; font-size: 22px; font-weight: 800; color: #0f172a; margin: 0 0 6px; letter-spacing: -.4px; }

.sf-tabs { display: flex; background: #f1f5f9; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 28px; }
.sf-tab { flex: 1; padding: 9px 0; border: none; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s; background: transparent; color: #64748b; font-family: inherit; }
.sf-tab.active { background: #fff; color: #4f46e5; box-shadow: 0 2px 8px rgba(0,0,0,.10); }

.sf-field { margin-bottom: 16px; }
.sf-field-label { display: block; font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 7px; text-transform: uppercase; letter-spacing: .6px; }
.sf-input { width: 100%; background: #f8fafc; color: #0f172a; border: 2px solid #e2e8f0; border-radius: 12px; padding: 13px 16px; font-size: 15px; font-family: inherit; outline: none; transition: .2s; }
.sf-input:focus { border-color: #6366f1; background: #fff; box-shadow: 0 0 0 4px rgba(99,102,241,.12); }
.sf-input-pin { font-size: 22px; letter-spacing: 10px; text-align: center; }

.sf-login-btn { width: 100%; padding: 15px; background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border: none; border-radius: 14px; font-size: 15px; font-weight: 800; cursor: pointer; transition: .2s; margin-top: 8px; box-shadow: 0 4px 20px rgba(99,102,241,.4); display: flex; align-items: center; justify-content: center; font-family: inherit; }
.sf-login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,.45); }

.sf-notice { padding: 11px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 14px; display: none; }
.sf-notice-err { background: #fef2f2; color: #dc2626; border: 1.5px solid #fecaca; }
.sf-notice.show { display: block; }

.sf-work-header { background: linear-gradient(135deg,#6366f1,#8b5cf6); padding: 20px 24px; display: flex; align-items: center; gap: 14px; }
.sf-work-avatar { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.sf-work-info { flex: 1; }
.sf-work-name { font-size: 16px; font-weight: 800; color: #fff; margin: 0; }
.sf-work-exit { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 9px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: .18s; font-family: inherit; }
.sf-work-exit:hover { background: rgba(255,255,255,.28); }

.sf-work-body { padding: 22px 24px 28px; }
.sf-task-field { background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 14px; overflow: hidden; margin-bottom: 14px; transition: .2s; }
.sf-task-field:focus-within { border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99,102,241,.10); }
.sf-task-field textarea { width: 100%; border: none; outline: none; background: transparent; padding: 14px 16px; font-size: 15px; font-family: inherit; color: #0f172a; resize: none; min-height: 90px; }
.sf-task-field-footer { display: flex; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid #e2e8f0; background: #fff; }
.sf-send-btn { background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border: none; border-radius: 10px; padding: 9px 20px; font-size: 14px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit; }
.sf-send-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(99,102,241,.35); }

.sf-section { font-size: 11px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: .8px; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.sf-section::after { content: ''; flex: 1; height: 1px; background: #f1f5f9; }

.sf-task-card { background: #f8fafc; border: 1.5px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; margin-bottom: 8px; transition: .2s; }
.sf-task-card:hover { border-color: #c7d2fe; box-shadow: 0 2px 12px rgba(99,102,241,.08); }
.sf-task-card.done { opacity: .55; }
.sf-task-body { font-size: 14px; color: #1e293b; line-height: 1.6; word-break: break-word; }
.sf-task-meta { font-size: 11px; color: #94a3b8; margin-top: 6px; }
.sf-shop-pill { display: inline-flex; align-items: center; background: #ede9fe; color: #6d28d9; border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 700; margin-bottom: 7px; }
.sf-check-row { display: flex; align-items: center; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.sf-check-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #c7d2fe; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; font-size: 12px; color: transparent; }
.sf-check-box:hover { border-color: #6366f1; background: #ede9fe; color: #6366f1; }
.sf-check-label { font-size: 13px; font-weight: 600; color: #6366f1; cursor: pointer; }
.sf-empty { text-align: center; padding: 20px 0; font-size: 14px; color: #cbd5e1; }

/* =========================================
   БУКВЕННАЯ КЛАВИАТУРА ДЛЯ ТЕКСТОВОГО ПОЛЯ
   ========================================= */
#sf-osk {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: #cbd5e1; padding: 10px 6px; box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    z-index: 2147483647; user-select: none; -webkit-user-select: none;
}
#sf-osk.active { display: block; animation: oskSlideUp 0.3s cubic-bezier(0.34, 1.46, 0.64, 1) forwards; }
@keyframes oskSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.osk-panel { max-width: 900px; margin: 0 auto; }
.osk-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }

.osk-btn {
    background: #fff; border-radius: 8px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-family: inherit; color: #0f172a; transition: 0.1s;
}
.osk-btn:active { background: #94a3b8; color: #fff; transform: translateY(1px); box-shadow: none; }

.osk-text-btn { font-size: 20px; font-weight: 500; flex: 1; height: 48px; max-width: 60px; }
.osk-btn.wide { flex: 1.5; max-width: 80px; font-size: 15px; font-weight: 600; background: #94a3b8; color: #fff; }
.osk-btn.space { flex: 4; max-width: 320px; }
.osk-btn.primary { background: #3b82f6; color: #fff; font-weight: 700; }
.osk-btn.primary:active { background: #2563eb; color: #fff; }
.osk-btn.shift-active { background: #fff; color: #3b82f6; box-shadow: 0 0 0 2px #3b82f6 inset; }

@media (max-width: 1023px) {
    #sf-osk { display: none !important; }
}