*,*::before,*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

:root{
  --bg:#f5f6fa;
  --surface:#ffffff;
  --primary:#4f46e5;
  --text:#111827;
  --text-2:#6b7280;
  --border:#e5e7eb;
  --radius:12px;
  --radius-sm:8px;
  --font:'Plus Jakarta Sans',sans-serif;
  --font-serif:'Lora',serif;
}

body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
}

nav{
  height:60px;
  background:white;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  padding:0 24px;
  gap:16px;
}

.logo{
  font-size:20px;
  font-weight:700;
  color:var(--primary);
  text-decoration:none;
}

.logo span{
  color:var(--text);
}

.nav-search{
  flex:1;
  position:relative;
}

.nav-search input{
  width:100%;
  height:40px;
  border:1px solid var(--border);
  border-radius:99px;
  padding:0 16px 0 40px;
}

.si{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
}

.btn-new{
  height:36px;
  padding:0 16px;
  border:none;
  border-radius:var(--radius-sm);
  background:var(--primary);
  color:white;
  cursor:pointer;
}

.layout{
  display:flex;
}

aside{
  width:240px;
  background:#1e1f2e;
  color:white;
  min-height:100vh;
  padding:20px 12px;
}

.sidebar-item{
  padding:10px 12px;
  border-radius:8px;
  margin-bottom:4px;
  cursor:pointer;
}

.sidebar-item:hover{
  background:rgba(255,255,255,.1);
}

.sidebar-label{
  font-size:12px;
  margin-bottom:10px;
}

.sidebar-divider{
  height:1px;
  background:rgba(255,255,255,.1);
  margin:10px 0;
}

main{
  flex:1;
  padding:30px;
}

.page-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:20px;
}

.page-title{
  font-size:24px;
  font-weight:700;
}

.page-sub{
  color:var(--text-2);
}

.filter-bar{
  display:flex;
  gap:10px;
}

.filter-select{
  height:36px;
  padding:0 12px;
}

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:20px;
}

.stat{
  background:white;
  padding:20px;
  border-radius:var(--radius);
  border:1px solid var(--border);
}

.stat-val{
  font-size:28px;
  font-weight:700;
}

.notes-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:16px;
}

.note-card{
  background:white;
  border-radius:var(--radius);
  border:1px solid var(--border);
  padding:20px;
}

.note-card-title{
  font-size:18px;
  font-weight:700;
  margin-bottom:10px;
}

.note-card-body{
  font-family:var(--font-serif);
  color:var(--text-2);
}

.modal-backdrop{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.5);
  justify-content:center;
  align-items:center;
}

.modal-backdrop.open{
  display:flex;
}

.modal{
  width:100%;
  max-width:600px;
  background:white;
  border-radius:var(--radius);
}

.modal-head,
.modal-body,
.modal-foot{
  padding:20px;
}

.form-group{
  margin-bottom:15px;
}

.form-input,
.form-textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
}

.form-textarea{
  min-height:150px;
}

.btn-save2{
  background:var(--primary);
  color:white;
  border:none;
  padding:10px 16px;
  border-radius:8px;
}

.btn-cancel2{
  padding:10px 16px;
}