@charset "UTF-8";
@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;1,9..40,400&display=swap');

:root {
  --bg:      #0f1117;
  --bg2:     #181b24;
  --bg3:     #1e2130;
  --accent:  #4f7cff;
  --accent2: #7c5cff;
  --text:    #f0f2ff;
  --text2:   #8b90a7;
  --border:  rgba(255,255,255,0.08);
  --green:   #3ecf8e;
  --amber:   #f59e0b;
  --red:     #ef4444;
  --radius:  16px;
  --rsm:     10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGIN ─────────────────────────────────────────────── */
.login-wrap {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; flex: 1; padding: 2rem;
}
.logo-mark {
  width: 76px; height: 76px; border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600; letter-spacing: -1px;
  margin-bottom: 1.25rem; color: #fff;
}
.login-title { font-size: 28px; font-weight: 600; margin-bottom: 4px; }
.login-sub   { color: var(--text2); font-size: 14px; margin-bottom: 2rem; }
.login-card  { width: 100%; max-width: 340px; }

.hub-input {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--rsm);
  padding: 13px 16px; font-size: 15px;
  font-family: inherit; width: 100%;
}
.hub-input:focus { outline: none; border-color: var(--accent); }
.hub-input::placeholder { color: var(--text2); }

.hub-btn {
  background: var(--accent); border: none; color: #fff;
  border-radius: var(--rsm); padding: 14px;
  font-size: 15px; font-weight: 500; font-family: inherit;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px; transition: opacity .2s;
}
.hub-btn:active { opacity: .8; }

.fingerprint-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; color: var(--text2); transition: all .2s;
}
.fingerprint-btn i    { font-size: 38px; color: var(--accent); }
.fingerprint-btn:active { background: var(--bg3); }

/* ── LAYOUT ────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 50px 20px 12px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.topbar-title { font-size: 20px; font-weight: 600; }

.content-area {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.bottom-nav {
  display: flex; background: var(--bg2);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  flex-shrink: 0;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 12px 8px;
  background: none; border: none; color: var(--text2);
  font-family: inherit; font-size: 11px; cursor: pointer;
  transition: color .2s;
}
.nav-item i      { font-size: 22px; }
.nav-item.active { color: var(--accent); }

.icon-btn {
  background: none; border: none; color: var(--text2);
  padding: 8px; border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: all .15s;
}
.icon-btn:active { background: var(--bg3); color: var(--text); }
.icon-btn.danger:active { color: var(--red); }

/* ── ITEMS ─────────────────────────────────────────────── */
.items-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.item-card-body { flex: 1; min-width: 0; }
.item-title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub   { font-size: 12px; color: var(--text2); margin-top: 3px; }
.item-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ── TOGGLE ────────────────────────────────────────────── */
.toggle { position: relative; width: 46px; height: 27px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--bg3); border-radius: 14px; cursor: pointer; transition: .2s; }
.toggle-slider::before { content: ''; position: absolute; width: 21px; height: 21px; left: 3px; top: 3px; background: var(--text2); border-radius: 50%; transition: .2s; }
input:checked + .toggle-slider { background: var(--accent); }
input:checked + .toggle-slider::before { transform: translateX(19px); background: #fff; }

/* ── CALENDAR ──────────────────────────────────────────── */
.calendar-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 0 14px; }
.month-label  { font-size: 16px; font-weight: 600; text-transform: capitalize; }

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 16px; }
.cal-day-header { text-align: center; font-size: 11px; color: var(--text2); padding: 4px 0; font-weight: 500; }
.cal-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer; font-size: 13px;
  position: relative; transition: background .15s; gap: 2px;
}
.cal-day:active { background: var(--bg3); }
.cal-day.today  { background: var(--accent); color: #fff; font-weight: 600; }
.cal-day.selected { background: var(--bg3); border: 1px solid var(--accent); }
.cal-day.other-month { color: var(--text2); opacity: .35; }

.cal-dots { display: flex; gap: 2px; }
.cal-dot  { width: 4px; height: 4px; border-radius: 50%; flex-shrink: 0; }
.cal-day.today .cal-dot { background: rgba(255,255,255,.7) !important; }

.day-label { font-size: 13px; color: var(--text2); margin-bottom: 10px; text-transform: capitalize; }
.day-events { display: flex; flex-direction: column; gap: 8px; }

.event-card { border-radius: var(--rsm); padding: 12px 14px; border-left: 3px solid; }
.event-title { font-size: 14px; font-weight: 500; }
.event-time  { font-size: 12px; opacity: .7; margin-top: 2px; }
.event-desc  { font-size: 12px; color: var(--text2); margin-top: 4px; }

/* ── NOTES ─────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--rsm); padding: 10px 14px; margin-bottom: 14px;
}
.search-bar i     { color: var(--text2); font-size: 18px; flex-shrink: 0; }
.search-bar input { background: none; border: none; color: var(--text); font-family: inherit; font-size: 14px; flex: 1; outline: none; }
.search-bar input::placeholder { color: var(--text2); }

.note-content {
  font-size: 12px; color: var(--text2); margin-top: 4px;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.category-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  background: var(--bg3); color: var(--text2);
  border: 1px solid var(--border); display: inline-block;
}

/* ── MODAL ─────────────────────────────────────────────── */
.hub-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; }
.hub-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.hub-modal-content {
  position: relative; background: var(--bg2);
  border-radius: 24px 24px 0 0; padding: 20px; width: 100%;
  max-height: 88dvh; overflow-y: auto;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
.hub-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; font-size: 17px; font-weight: 600;
}

.modal-label {
  font-size: 11px; color: var(--text2); margin: 12px 0 6px;
  font-weight: 500; text-transform: uppercase; letter-spacing: .05em;
}
.modal-input {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--rsm);
  padding: 12px 14px; font-size: 15px;
  font-family: inherit; width: 100%; resize: vertical;
}
.modal-input:focus { outline: none; border-color: var(--accent); }
.modal-input::placeholder { color: var(--text2); }

.modal-save {
  background: var(--accent); border: none; color: #fff;
  border-radius: var(--rsm); padding: 14px; font-size: 15px;
  font-weight: 500; font-family: inherit; width: 100%;
  margin-top: 20px; cursor: pointer;
}

.day-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.day-chip {
  padding: 7px 13px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text2); font-size: 13px; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.day-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.color-picks { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.color-pick {
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent; transition: transform .15s;
}
.color-pick.active { border-color: #fff; transform: scale(1.18); }

/* ── FINGERPRINT SETUP ─────────────────────────────────── */
.fp-setup {
  background: var(--bg3); border-radius: var(--radius);
  padding: 14px; display: flex; align-items: center;
  gap: 12px; cursor: pointer; border: 1px solid var(--border); margin-top: 12px;
}
.fp-setup i { font-size: 26px; color: var(--accent); }
.fp-setup-text strong { display: block; font-size: 14px; }
.fp-setup-text span   { font-size: 12px; color: var(--text2); }

/* ── EMPTY STATE ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text2); }
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 14px; }

/* ── TOAST ─────────────────────────────────────────────── */
.hub-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 10px 20px;
  border-radius: 20px; font-size: 13px;
  opacity: 0; transition: opacity .3s;
  pointer-events: none; white-space: nowrap; z-index: 2000;
}
.hub-toast.show { opacity: 1; }

/* ── SPINNER ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.ti-spin { animation: spin 1s linear infinite; display: inline-block; }
