:root {
  --bg: #121019;
  --text: #f0f0f5;
  --hint: #9b99a8;
  --link: #a27df7;
  --btn: #7c5bf7;
  --btn-text: #ffffff;
  --secondary: #1e1b2e;
  --danger: #e53935;
  --accent: #a27df7;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
#app { display: flex; flex-direction: column; height: 100vh; }
#topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--secondary);
}
#topbar h1 { font-size: 20px; }
.icon-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); }
#content { flex: 1; overflow-y: auto; padding: 12px 16px 80px; }
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; border-top: 1px solid var(--secondary); background: var(--bg);
}
.tab {
  flex: 1; padding: 8px 0 6px; border: none; background: none;
  font-size: 18px; cursor: pointer; color: var(--hint);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab span { font-size: 10px; }
.tab.active { color: var(--accent); }

.loading { text-align: center; color: var(--hint); padding: 40px 0; }
.card {
  background: var(--secondary); border-radius: 12px;
  padding: 12px 14px; margin-bottom: 10px;
}
.card h3 { font-size: 16px; margin-bottom: 4px; }
.card .meta { font-size: 13px; color: var(--hint); }
.card .actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

button.btn {
  background: var(--btn); color: var(--btn-text); border: none;
  border-radius: 10px; padding: 10px 16px; font-size: 15px; cursor: pointer;
}
button.btn.secondary { background: #2d2942; color: var(--text); }
button.btn.danger { background: var(--danger); }
button.btn.small { padding: 6px 12px; font-size: 13px; }

input, select, textarea {
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid #2d2942; border-radius: 10px;
  background: #181524; color: var(--text); font-size: 15px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent);
}
label { font-size: 13px; color: var(--hint); display: block; margin: 8px 0 4px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 6px 12px; border-radius: 16px; border: none; cursor: pointer;
  background: var(--secondary); color: var(--text); font-size: 13px;
}
.chip.active { background: var(--btn); color: var(--btn-text); }

.cal-grid { display: grid; grid-template-columns: 18px repeat(7, 1fr); gap: 1px; }
.cal-day {
  height: 34px; border-radius: 5px; background: var(--secondary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; position: relative; cursor: pointer;
}
.cal-day.empty { background: transparent; cursor: default; }
.cal-day.today { outline: 2px solid var(--accent); }
.cal-day .dots { font-size: 7px; line-height: 1; }
.cal-weeknum {
  height: 34px; line-height: 34px;
  text-align: center;
  font-size: 8px; color: var(--hint); cursor: pointer;
  border-radius: 5px;
}
.cal-weeknum:hover { background: var(--secondary); color: var(--text); }
.cal-day.empty { height: 34px; }
.cal-head { text-align: center; font-weight: 600; margin: 4px 0; font-size: 15px; }
.cal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.cal-filter { margin-bottom: 2px; font-size: 12px; padding: 3px 5px; }

.row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--secondary); }
.row:last-child { border-bottom: none; }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--secondary); }
.pill.high, .pill.critical { background: #3d2328; color: #ff8a8a; }
.empty { text-align: center; color: var(--hint); padding: 30px 0; }
