* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1117;
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.userbar {
  position: fixed;
  top: 16px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 99px;
  padding: 6px 12px 6px 6px;
}
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.user-avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #6c63ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-name {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-logout {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1px solid #2a2d3a;
  background: transparent;
  color: #888;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.btn-logout:hover { color: #fff; border-color: #555; }

.btn-login {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid #2a2d3a;
  background: #1a1d27;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.btn-login:hover { border-color: #6c63ff; box-shadow: 0 0 0 3px rgba(108,99,255,.15); }
.btn-login svg { flex-shrink: 0; }

h1 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -1px; }
.subtitle { color: #888; margin-bottom: 48px; font-size: 15px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 520px;
}

a.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 36px 24px;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
a.app-card:hover {
  border-color: #6c63ff;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(108,99,255,.25);
}

.icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
}
.icon-notes   { background: linear-gradient(135deg,#6c63ff,#a78bfa); }
.icon-finance { background: linear-gradient(135deg,#10b981,#34d399); }

.app-name { font-size: 18px; font-weight: 700; }
.app-desc { font-size: 13px; color: #888; text-align: center; }

#installBtn {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 12px 24px;
  border-radius: 99px;
  border: 1.5px dashed #6c63ff;
  background: transparent;
  color: #6c63ff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
#installBtn:hover { background: rgba(108,99,255,.1); }
#installBtn svg { flex-shrink: 0; }

.quote-block {
  width: 100%;
  max-width: 520px;
  margin-top: 48px;
  padding: 32px 36px;
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 16px;
  position: relative;
}
.quote-mark {
  font-size: 80px;
  line-height: 1;
  color: #6c63ff;
  font-family: Georgia, serif;
  position: absolute;
  top: 8px;
  left: 20px;
  opacity: .6;
  user-select: none;
}
.quote-text {
  font-size: 17px;
  line-height: 1.65;
  color: #e2e8f0;
  font-style: italic;
  margin-top: 28px;
}
.quote-author {
  margin-top: 16px;
  font-size: 13px;
  color: #6c63ff;
  font-weight: 600;
  letter-spacing: .4px;
}
.quote-author::before { content: '-- '; }

.userbar-loading {
  width: 120px; height: 42px;
  background: #1a1d27;
  border-radius: 99px;
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: .5; }
  50%      { opacity: 1; }
}