html, body, #root { margin: 0; min-height: 100%; }
body { background: #f5f3ff; }
.sa-app { font-family: "Noto Sans Arabic", system-ui, sans-serif; color: #2d2a4a; background: #f5f3ff; min-height: 100vh; max-width: 520px; margin: 0 auto; }
.sa-app * { box-sizing: border-box; font-family: inherit; }
.sa-main { padding: 0 16px 40px; }
.sa-hd { background: linear-gradient(135deg, #7c5cff, #b388ff); color: #fff; margin: 0 -16px 14px; padding: 22px 18px 20px; border-radius: 0 0 28px 28px; }
.sa-hd h1 { margin: 2px 0; font-size: 24px; } .sa-hd small { opacity: .92; font-size: 13px; }
.sa-app h2 { font-size: 16px; margin: 16px 0 8px; }
.sa-card { display: block; width: 100%; background: #fff; border: 0; border-radius: 18px; padding: 12px 14px; margin-bottom: 8px; box-shadow: 0 2px 8px #7c5cff22; text-align: right; color: inherit; font-size: 15px; }
.sa-link { cursor: pointer; }
.sa-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sa-c { text-align: center; }
.sa-n { font-size: 22px; font-weight: 700; color: #7c5cff; }
.sa-big { font-size: 22px; min-width: 28px; text-align: center; }
.sa-cap { font-size: 12px; color: #888; }
.sa-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .sa-grid3 .sa-card { margin: 0; padding: 12px 6px; }
.sa-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 8px; } .sa-grid2 .sa-card { margin: 0; }
.sa-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.sa-tag { font-size: 12px; padding: 3px 10px; border-radius: 99px; font-weight: 700; background: #ece6ff; color: #5b3fd6; white-space: nowrap; }
.sa-tag.g { background: #d9f7e4; color: #13804a; } .sa-tag.r { background: #ffe0e0; color: #c0392b; } .sa-tag.y { background: #fff2cc; color: #9a6b00; }
.sa-bar { height: 8px; background: #eee; border-radius: 9px; overflow: hidden; margin-top: 8px; } .sa-bar i { display: block; height: 100%; background: #7c5cff; }
.sa-chk { width: 34px; height: 34px; border-radius: 10px; border: 2px solid #7c5cff; background: #fff; color: #fff; font-size: 18px; cursor: pointer; padding: 0; }
.sa-chk.on { background: #22b573; border-color: #22b573; }
.sa-btn { min-width: 40px; height: 40px; border-radius: 12px; border: 0; background: #ece6ff; color: #5b3fd6; font-size: 20px; font-weight: 700; cursor: pointer; padding: 0 10px; }
.sa-btn.wide { flex: 1; font-size: 15px; } .sa-btn.red { background: #c0392b; color: #fff; }
.sa-back { background: none; border: 0; color: #fff; font-size: 14px; padding: 0; cursor: pointer; }
.sa-colhead { padding: 0 14px 4px; font-size: 12px; color: #888; } .sa-colhead span { width: 34px; text-align: center; } .sa-colhead span:first-child { width: 80px; }
.sa-wrow { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 12px; padding: 6px 14px; margin-bottom: 5px; box-shadow: 0 1px 4px #7c5cff22; }
.sa-wrow.now { outline: 2px solid #b388ff; }
.sa-field { display: flex; flex-direction: column; gap: 4px; } .sa-field input { border: 0; outline: 0; font-size: 16px; font-weight: 700; background: transparent; color: #2d2a4a; width: 100%; }
.sa-avatar { width: 84px; height: 84px; border-radius: 50%; background: #fff; color: #7c5cff; font-size: 38px; font-weight: 700; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.sa-save { font-size: 11px; color: #999; text-align: center; margin: 14px 0 0; }
.sa-nav { position: sticky; top: 0; width: 100%; height: 66px; background: #fff; box-shadow: 0 2px 10px #0001; display: flex; justify-content: space-around; align-items: center; z-index: 5; }
.sa-nav button { background: none; border: 0; font-size: 11px; color: #2d2a4a; opacity: .5; cursor: pointer; flex: 1; padding: 6px 0; } .sa-nav button b { display: block; font-size: 20px; } .sa-nav button.on { opacity: 1; color: #7c5cff; font-weight: 700; }

.sa-subj { flex: 1; display: flex; align-items: center; justify-content: space-between; background: none; border: 0; padding: 0; cursor: pointer; text-align: right; color: inherit; font-size: 15px; }
.sa-quote { background: #fff; border-radius: 22px; padding: 22px 20px; margin-bottom: 10px; text-align: center; box-shadow: 0 2px 10px #7c5cff22; }
.sa-quote p { margin: 6px 0 0; font-size: 22px; font-weight: 700; line-height: 1.6; color: #5b3fd6; } .sa-qmark { font-size: 40px; color: #b388ff; line-height: 1; }

.sa-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sa-tile { border: 0; border-radius: 24px; padding: 20px 8px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; cursor: pointer; color: #2d2a4a; font-size: 16px; box-shadow: 0 2px 8px #7c5cff22; min-height: 170px; justify-content: center; }
.sa-ticon { font-size: 54px; line-height: 1; }
.sa-clock { background: #fff; border-radius: 22px; padding: 16px; margin-bottom: 10px; text-align: center; box-shadow: 0 2px 10px #7c5cff22; direction: ltr; }
.sa-time { font-size: 44px; font-weight: 700; color: #2d2a4a; letter-spacing: 1px; } .sa-sec { font-size: 24px; color: #b388ff; } .sa-ap { font-size: 20px; color: #7c5cff; }
.sa-date { font-size: 14px; color: #888; margin-top: 2px; direction: rtl; }

.sa-ta, .sa-in { width: 100%; border: 1.5px solid #e4dcff; border-radius: 12px; padding: 10px; font-size: 15px; background: #faf8ff; color: #2d2a4a; margin-bottom: 6px; outline: 0; resize: vertical; }
.sa-note { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.sa-del { background: #ffe0e0; color: #c0392b; border: 0; border-radius: 10px; width: 34px; height: 34px; font-size: 16px; cursor: pointer; flex: none; }
.sa-err { color: #c0392b; font-size: 13px; }
.sa-nav button { font-size: 10px; }

/* ===== v2 look ===== */
.sa-app { overflow: hidden; position: relative; background: linear-gradient(180deg, #f1ecff 0%, #fbf9ff 45%, #f4f0ff 100%); font-size: 15px; }
.sa-app::before, .sa-app::after { content: ''; position: absolute; border-radius: 50%; z-index: 0; filter: blur(40px); opacity: .5; pointer-events: none; }
.sa-app::before { width: 240px; height: 240px; background: #c9b6ff; top: 120px; left: -90px; animation: sa-drift 14s ease-in-out infinite alternate; }
.sa-app::after { width: 220px; height: 220px; background: #ffd1e6; top: 520px; right: -80px; animation: sa-drift 17s ease-in-out infinite alternate-reverse; }
@keyframes sa-drift { to { transform: translate(50px, 70px) scale(1.15); } }
.sa-top { position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: rgba(255,255,255,.82); backdrop-filter: blur(12px); box-shadow: 0 4px 18px #7c5cff22; }
.sa-brand { font-weight: 800; letter-spacing: 4px; font-size: 20px; background: linear-gradient(90deg, #7c5cff, #ff7eb6); -webkit-background-clip: text; background-clip: text; color: transparent; direction: ltr; }
.sa-cur { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: #5b3fd6; background: #ece6ff; padding: 6px 12px; border-radius: 99px; animation: sa-pop .4s ease; }
.sa-burger { width: 42px; height: 42px; border-radius: 14px; border: 0; background: linear-gradient(135deg, #7c5cff, #b388ff); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; box-shadow: 0 4px 12px #7c5cff55; transition: transform .2s; }
.sa-burger:active { transform: scale(.92); }
.sa-burger i { display: block; width: 20px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .3s, opacity .3s; }
.sa-burger.open i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); } .sa-burger.open i:nth-child(2) { opacity: 0; } .sa-burger.open i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.sa-scrim { position: absolute; top: 58px; right: 0; left: 0; height: 4000px; background: #2d2a4a66; animation: sa-fade .3s ease; z-index: 1; }
.sa-side { position: absolute; top: 58px; right: 0; width: 76%; max-width: 300px; background: linear-gradient(180deg, #5b3fd6, #8a63ff 60%, #b388ff); border-radius: 0 0 0 28px; padding: 14px 12px 20px; transform: translateX(105%); transition: transform .38s cubic-bezier(.2,.9,.3,1); z-index: 2; box-shadow: -10px 14px 30px #5b3fd655; visibility: hidden; }
.sa-side.open { transform: none; visibility: visible; }
.sa-side-hd { display: flex; align-items: center; gap: 12px; color: #fff; padding: 8px 8px 16px; border-bottom: 1px solid #fff3; margin-bottom: 8px; }
.sa-logo { width: 46px; height: 46px; border-radius: 16px; background: #fff; color: #7c5cff; font-weight: 800; font-size: 24px; display: flex; align-items: center; justify-content: center; animation: sa-float 3s ease-in-out infinite; }
.sa-item { width: 100%; display: flex; align-items: center; gap: 14px; background: none; border: 0; color: #fff; font-size: 16px; font-weight: 600; padding: 13px 12px; border-radius: 16px; cursor: pointer; margin-bottom: 4px; text-align: right; opacity: 0; transform: translateX(30px); transition: background .2s; }
.sa-side.open .sa-item { animation: sa-in .45s ease forwards; animation-delay: calc(var(--i) * 55ms + 120ms); }
.sa-item:hover, .sa-item.on { background: #ffffff2e; } .sa-item.on { box-shadow: inset -4px 0 0 #ffd86b; }
.sa-eico { width: 38px; height: 38px; border-radius: 12px; background: #ffffff26; display: flex; align-items: center; justify-content: center; font-size: 20px; }
@keyframes sa-in { to { opacity: 1; transform: none; } }
@keyframes sa-fade { from { opacity: 0; } }
@keyframes sa-pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }
@keyframes sa-float { 50% { transform: translateY(-5px) rotate(-3deg); } }
.sa-main { position: relative; z-index: 1; padding: 0 16px 40px; }
.sa-main > * { animation: sa-up .5s cubic-bezier(.2,.8,.3,1) both; }
.sa-main > *:nth-child(1) { animation-delay: 0s; } .sa-main > *:nth-child(2) { animation-delay: .06s; } .sa-main > *:nth-child(3) { animation-delay: .12s; } .sa-main > *:nth-child(4) { animation-delay: .18s; } .sa-main > *:nth-child(5) { animation-delay: .22s; } .sa-main > *:nth-child(n+6) { animation-delay: .26s; }
@keyframes sa-up { from { opacity: 0; transform: translateY(18px); } }
.sa-hd { position: relative; overflow: hidden; margin: 0 -16px 16px; padding: 26px 20px 24px; border-radius: 0 0 34px 34px; background: linear-gradient(135deg, #6a49f0 0%, #9a70ff 55%, #ff8fc2 120%); box-shadow: 0 12px 28px #7c5cff44; }
.sa-hd::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: #ffffff22; top: -50px; left: -40px; animation: sa-drift 8s ease-in-out infinite alternate; }
.sa-hd::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: #ffffff1c; bottom: -30px; left: 80px; animation: sa-drift 10s ease-in-out infinite alternate-reverse; }
.sa-hd > * { position: relative; z-index: 1; } .sa-hd h1 { font-size: 26px; text-shadow: 0 2px 8px #0003; }
.sa-card { border-radius: 22px; box-shadow: 0 6px 18px #7c5cff1c; transition: transform .2s, box-shadow .2s; }
.sa-link:hover, .sa-tile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px #7c5cff30; } .sa-link:active, .sa-tile:active, .sa-btn:active { transform: scale(.97); }
.sa-tile { position: relative; overflow: hidden; border-radius: 28px; transition: transform .25s, box-shadow .25s; } .sa-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(160deg, #fff7, transparent 55%); pointer-events: none; }
.sa-ticon { animation: sa-float 4s ease-in-out infinite; filter: drop-shadow(0 6px 8px #0002); } .sa-tile:nth-child(2n) .sa-ticon { animation-delay: -1.5s; } .sa-tile:nth-child(3n) .sa-ticon { animation-delay: -2.5s; }
.sa-chk { transition: transform .2s, background .2s, border-color .2s; } .sa-chk.on { animation: sa-pop .35s ease; box-shadow: 0 4px 10px #22b57355; }
.sa-clock { background: linear-gradient(135deg, #2d2a4a, #4a3f9a); border-radius: 26px; box-shadow: 0 12px 26px #4a3f9a44; }
.sa-time { color: #fff; } .sa-sec { color: #ffd86b; animation: sa-blink 1s steps(2) infinite; } .sa-ap { color: #ffb4d6; } .sa-date { color: #d9d2ff; }
@keyframes sa-blink { 50% { opacity: .55; } }
.sa-quote { background: linear-gradient(135deg, #fff, #f6f0ff); border-radius: 26px; border: 1.5px solid #e9defe; } .sa-qmark { animation: sa-float 3s ease-in-out infinite; }
.sa-art { display: block; width: 210px; margin: 0 auto 4px; overflow: visible; }
.sa-bk1 { animation: sa-float 4s ease-in-out infinite; } .sa-bk2 { animation: sa-float 4s ease-in-out infinite -.6s; } .sa-bk3 { animation: sa-float 4s ease-in-out infinite -1.2s; } .sa-cap-art { animation: sa-float 3.4s ease-in-out infinite -.4s; transform-origin: 110px 36px; }
.sa-star { animation: sa-twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; } .sa-star.s2 { animation-delay: -.8s; } .sa-star.s3 { animation-delay: -1.5s; }
@keyframes sa-twinkle { 50% { transform: scale(1.4) rotate(20deg); opacity: .6; } }
.sa-wrow { border-radius: 16px; transition: transform .2s; } .sa-wrow:hover { transform: translateX(-3px); }
.sa-bar i { background: linear-gradient(90deg, #7c5cff, #ff8fc2); transition: width .5s ease; }
@media (prefers-reduced-motion: reduce) { .sa-app *, .sa-app::before, .sa-app::after { animation: none !important; transition: none !important; } .sa-item { opacity: 1; transform: none; } }
