* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, system-ui, sans-serif; background: #0f1420; color: #e8ecf4; min-height: 100vh; }
.hidden { display: none !important; }

/* Auth */
#auth-view { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; background: #1a2233; border-radius: 16px; padding: 32px 24px; }
.auth-card h1 { text-align: center; font-size: 28px; margin-bottom: 4px; }
.tagline { text-align: center; color: #8b95ad; margin-bottom: 24px; font-size: 14px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; padding: 10px; background: #0f1420; border: none; color: #8b95ad; border-radius: 8px; font-size: 15px; }
.tab.active { background: #2b3a55; color: #fff; }
input, select, textarea { width: 100%; padding: 12px; margin-bottom: 12px; background: #0f1420; border: 1px solid #2b3a55; color: #e8ecf4; border-radius: 8px; font-size: 16px; }
button.primary { width: 100%; padding: 14px; background: #4f7cff; border: none; color: #fff; border-radius: 8px; font-size: 16px; font-weight: 600; }
button.primary:active { background: #3d63d6; }
.error { color: #ff7b7b; margin-top: 12px; text-align: center; font-size: 14px; }

/* App shell */
#app-view { display: flex; flex-direction: column; min-height: 100vh; }
header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: #1a2233; position: sticky; top: 0; z-index: 10; }
header h1 { font-size: 20px; }
.logout { background: none; border: 1px solid #2b3a55; color: #8b95ad; padding: 8px 14px; border-radius: 8px; font-size: 14px; }
main { flex: 1; padding: 16px; padding-bottom: 90px; max-width: 720px; width: 100%; margin: 0 auto; }
#bottomnav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; background: #1a2233; border-top: 1px solid #2b3a55; padding-bottom: env(safe-area-inset-bottom); }
#bottomnav button { flex: 1; background: none; border: none; color: #8b95ad; padding: 14px 4px; font-size: 13px; }
#bottomnav button.active { color: #4f7cff; font-weight: 600; }

/* Cards */
.card { background: #1a2233; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { color: #8b95ad; font-size: 14px; margin-bottom: 4px; }
.scores { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.score { background: #0f1420; border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.score b { display: block; font-size: 18px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.badge.RECOMMENDED { background: #1d4d2b; color: #7dffa8; }
.badge.HIGH_PRIORITY { background: #4d3f1d; color: #ffd97d; }
.badge.DISCOVERED { background: #2b3a55; color: #8b95ad; }
.badge.APPLIED { background: #1d3a4d; color: #7dd3ff; }
.badge.WON { background: #1d4d2b; color: #7dffa8; }
.badge.PASSED, .badge.ARCHIVED { background: #333; color: #999; }
.row { display: flex; gap: 8px; }
.row button { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #2b3a55; background: #0f1420; color: #e8ecf4; font-size: 14px; }
.row button.go { background: #4f7cff; border: none; color: #fff; font-weight: 600; }
h2 { font-size: 20px; margin-bottom: 14px; }
.fab { position: fixed; bottom: 80px; right: 16px; width: 56px; height: 56px; border-radius: 50%; background: #4f7cff; border: none; color: #fff; font-size: 28px; z-index: 5; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.modal-card { background: #1a2233; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0; padding: 20px; max-height: 85vh; overflow-y: auto; }
.modal-card h2 { margin-bottom: 12px; }
.proposal-text { white-space: pre-wrap; background: #0f1420; border-radius: 8px; padding: 14px; font-size: 14px; line-height: 1.6; margin: 12px 0; max-height: 40vh; overflow-y: auto; }
.guide-frame { width: 100%; height: calc(100vh - 200px); border: none; border-radius: 12px; background: #fff; }
#toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #2b3a55; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 30; }
.wake { text-align: center; color: #8b95ad; padding: 40px 20px; }
.wake .spin { font-size: 32px; animation: spin 1.5s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: #8b95ad; padding: 40px 20px; }
