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

:root {
  --bg: #0b0e1a;
  --bg2: #141829;
  --card-bg: rgba(255,255,255,0.05);
  --text: #ffffff;
  --text2: rgba(255,255,255,0.6);
  --accent: #7c3aed;
  --accent2: #2563eb;
  --gradient: linear-gradient(135deg, #22b8cf, #a855f7);
  --card-inbox: linear-gradient(135deg, #1a2d5e, #3b6cf5);
  --card-sort: linear-gradient(135deg, #2d1560, #7c3aed);
  --card-delete: linear-gradient(135deg, #3d2010, #9b5a2a);
  --card-errors: linear-gradient(135deg, #0a3327, #10b981);
  --radius: 16px;
  --nav-height: 68px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 14px calc(var(--nav-height) + 16px);
}

.header {
  display: flex;
  align-items: center;
  padding: 4px 0 10px;
}
.header-icon { font-size: 24px; }
.header-title {
  flex: 1;
  font-size: 20px;
  font-weight: 700;
  margin-left: 8px;
}
.header-bell {
  font-size: 20px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.header-bell:hover { opacity: 1; }

.hero {
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(124,58,237,0.15), transparent 70%);
  pointer-events: none;
}
.hero-text { flex: 1; z-index: 1; }
.hero-text h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.hero-text h2 span { color: #a78bfa; }
.hero-sub { font-size: 15px; color: var(--text2); line-height: 1.4; }
.hero-time {
  font-size: 12px;
  color: var(--text2);
  margin-top: 8px;
  opacity: 0.7;
}
.hero-img {
  width: 180px;
  min-width: 180px;
  z-index: 1;
}
.hero-img img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.card {
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.card:active { transform: scale(0.97); }
.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}
.card-inbox { background: var(--card-inbox); }
.card-sort { background: var(--card-sort); }
.card-delete { background: var(--card-delete); }
.card-errors { background: var(--card-errors); }

.card-header {
  font-size: 15px;
  font-weight: 700;
  opacity: 1;
  margin-bottom: 6px;
}
.card-icon { font-size: 16px; }
.card-value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 2px;
}
.card-hint {
  font-size: 13px;
  opacity: 0.6;
}

.btn-check {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--gradient);
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.btn-check:active { transform: scale(0.98); }
.btn-check:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-check.loading {
  pointer-events: none;
}
.btn-check.loading::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  100% { left: 100%; }
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(15,15,35,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text2);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: #a78bfa; }
.nav-icon { font-size: 22px; }
.nav-label { font-weight: 600; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeIn 0.3s ease forwards; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: