:root {
  --bg: #0f1115;
  --panel: #171a21;
  --accent: #5b8cff;
  --danger: #ff5b6a;
  --text: #eef0f4;
  --muted: #8b93a3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid #262b36;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.topbar h1 { font-size: 18px; margin: 0; }

.tabs { display: flex; gap: 6px; flex: 1; }

.tab {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
}

.tab.active { color: #fff; background: var(--accent); }

.logout {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

main { padding: 20px 24px 60px; max-width: 1000px; margin: 0 auto; }

.empty { color: var(--muted); text-align: center; padding: 60px 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  display: block;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  text-decoration: none;
  color: inherit;
}

.card img, .card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 6px;
}

.card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 20px 8px 8px;
  font-size: 10px;
  color: #eee;
}

.category-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }

.chip-tab {
  background: var(--panel);
  border: 1px solid #262b36;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
}

.chip-tab.active { color: #fff; background: var(--accent); border-color: var(--accent); }

.search-form { display: flex; gap: 8px; margin-bottom: 20px; }

.search-form input[type="text"] {
  flex: 1;
  background: var(--panel);
  border: 1px solid #262b36;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.search-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.notif-list { display: flex; flex-direction: column; gap: 10px; }

.notif-card {
  background: var(--panel);
  border: 1px solid #262b36;
  border-radius: 12px;
  padding: 14px 16px;
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.notif-app { flex: 1; }

.chip {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #4a5164;
}

.chip-mpesa { background: #1b8a3d; }
.chip-banking { background: #2361c9; }
.chip-sms { background: #7a5bff; }
.chip-social { background: #c94f8f; }
.chip-other { background: #4a5164; }

.notif-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.notif-text { font-size: 14px; color: var(--text); white-space: pre-wrap; margin-bottom: 10px; }

.notif-mpesa {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.notif-mpesa .mono { font-family: monospace; }

/* Login page */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-box {
  background: var(--panel);
  border: 1px solid #262b36;
  border-radius: 14px;
  padding: 32px;
  width: 300px;
  text-align: center;
}

.login-box h1 { margin: 0 0 6px; font-size: 20px; }
.login-box .muted { color: var(--muted); font-size: 13px; margin-bottom: 20px; }

.login-box input {
  width: 100%;
  background: var(--bg);
  border: 1px solid #262b36;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}

.login-box button {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
}

.login-box .error {
  background: #3a2020;
  color: var(--danger);
  padding: 8px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}
