@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Cormorant+Garamond:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
#root { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.glow-orb { position: fixed; border-radius: 50%; filter: blur(140px); opacity: .06; pointer-events: none; z-index: 0; }

/* Tabs */
.tab-btn { display: flex; align-items: center; gap: 7px; padding: 9px 14px; border: none; border-radius: 10px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all .25s; font-family: inherit; color: #6b7280; background: transparent; white-space: nowrap; }
.tab-btn:hover { color: #d1d5db; background: rgba(255,255,255,.04); }
.tab-btn.active { color: #f9fafb; background: rgba(255,255,255,.08); box-shadow: 0 0 20px rgba(139,92,246,.12), inset 0 0 0 1px rgba(255,255,255,.08); }

/* Cards */
.card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; backdrop-filter: blur(16px); transition: all .25s; }
.card:hover { border-color: rgba(255,255,255,.09); }

/* Calendar */
.cal-day { aspect-ratio: 1; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px; cursor: pointer; transition: all .2s; border: 1px solid transparent; font-size: 13px; min-height: 48px; }
.cal-day:hover { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
.cal-day.today { border-color: rgba(139,92,246,.5); background: rgba(139,92,246,.07); }
.cal-day.selected { border-color: rgba(139,92,246,.7); background: rgba(139,92,246,.12); box-shadow: 0 0 14px rgba(139,92,246,.15); }
.cal-day.sunday { background: rgba(139,92,246,.03); }

/* Buttons */
.btn-primary { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; border: none; border-radius: 10px; padding: 9px 18px; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .25s; font-family: inherit; box-shadow: 0 4px 14px rgba(124,58,237,.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124,58,237,.35); }
.btn-ghost { background: rgba(255,255,255,.05); color: #9ca3af; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; transition: all .2s; font-family: inherit; }
.btn-ghost:hover { background: rgba(255,255,255,.08); color: #e5e7eb; }
.btn-danger { background: rgba(239,68,68,.12); color: #f87171; border: 1px solid rgba(239,68,68,.15); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .2s; font-family: inherit; }
.btn-danger:hover { background: rgba(239,68,68,.2); }
.btn-warn { background: rgba(245,158,11,.12); color: #fbbf24; border: 1px solid rgba(245,158,11,.15); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .2s; font-family: inherit; }
.btn-warn:hover { background: rgba(245,158,11,.2); }
.btn-success { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.15); border-radius: 8px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: all .2s; font-family: inherit; }
.btn-success:hover { background: rgba(16,185,129,.2); }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadeIn .2s; }
.modal-content { background: #1e1b2e; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 26px; max-width: 520px; width: 92%; box-shadow: 0 25px 60px rgba(0,0,0,.5); animation: slideUp .3s; max-height: 82vh; overflow-y: auto; }

/* Forms */
.input-field { width: 100%; padding: 9px 13px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 8px; color: #e2e0ed; font-size: 13.5px; font-family: inherit; outline: none; transition: border-color .2s; }
.input-field:focus { border-color: rgba(139,92,246,.5); }
select.input-field { appearance: none; cursor: pointer; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 16px; font-size: 11px; font-weight: 600; letter-spacing: .2px; }
.dot-indicator { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* Notification Panel */
.notif-panel { position: absolute; top: 68px; right: 20px; width: 400px; max-height: 480px; overflow-y: auto; z-index: 90; background: #1e1b2e; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); animation: slideDown .25s; }

/* Toast */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 11px 22px; border-radius: 10px; font-size: 13px; font-weight: 500; z-index: 200; animation: toastIn .3s; box-shadow: 0 8px 28px rgba(0,0,0,.3); font-family: inherit; }
.toast.success { background: #065f46; color: #a7f3d0; border: 1px solid rgba(16,185,129,.3); }
.toast.info { background: #1e3a5f; color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }

/* Onboarding */
.phase-pip { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; transition: all .2s; cursor: pointer; border: 2px solid transparent; }
.phase-pip.done { background: rgba(16,185,129,.2); color: #34d399; border-color: rgba(16,185,129,.3); }
.phase-pip.current { background: rgba(139,92,246,.2); color: #a78bfa; border-color: rgba(139,92,246,.4); box-shadow: 0 0 10px rgba(139,92,246,.2); }
.phase-pip.pending { background: rgba(255,255,255,.04); color: #4b5563; border-color: rgba(255,255,255,.06); }

/* Members */
.invite-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; padding: 14px 16px; transition: all .2s; }
.invite-card:hover { border-color: rgba(255,255,255,.1); }
.member-card { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.03); display: flex; align-items: center; gap: 12px; transition: background .15s; cursor: pointer; }
.member-card:hover { background: rgba(255,255,255,.02); }
.activity-bar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.06); overflow: hidden; flex: 1; }
.activity-fill { height: 100%; border-radius: 2px; transition: width .3s; }
.avatar { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #fff; flex-shrink: 0; }

/* Loading */
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(160deg, #0a0e1a 0%, #111827 40%, #0f172a 100%); color: #a78bfa; font-family: 'DM Sans', sans-serif; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid rgba(139,92,246,.15); border-top-color: #a78bfa; border-radius: 50%; animation: spin .8s linear infinite; margin-bottom: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* PWA Install */
.pwa-install-banner { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #7c3aed, #6d28d9); color: white; padding: 14px 24px; border-radius: 14px; box-shadow: 0 8px 30px rgba(124,58,237,.4); display: flex; align-items: center; gap: 14px; z-index: 9999; font-family: 'DM Sans', sans-serif; animation: slideUpBanner .4s ease; max-width: 90vw; }
.pwa-install-banner button { background: white; color: #7c3aed; border: none; padding: 8px 18px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap; }
.pwa-install-banner .dismiss { background: transparent; color: rgba(255,255,255,.7); padding: 4px 8px; font-size: 12px; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes slideUpBanner { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }
