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

html, body {
  font-family: Vazir, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  min-height: 100vh;
}

body { display: flex; flex-direction: column; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #161a22;
  border-bottom: 1px solid #232936;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 { font-size: 1.2rem; font-weight: 700; color: #fff; }

.btn {
  font-family: inherit;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-primary { background: #4f8cff; color: #fff; }
.btn-primary:hover { background: #3b76e6; }
.btn-secondary { background: #232936; color: #e6e6e6; }
.btn-secondary:hover { background: #2c3445; }
.btn-danger { background: #e04848; color: #fff; }
.btn-danger:hover { background: #c33b3b; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

.center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.card {
  background: #161a22;
  border: 1px solid #232936;
  border-radius: 14px;
  padding: 1.5rem;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.card h2 { margin-bottom: 1rem; font-size: 1.1rem; color: #fff; font-weight: 700; }

textarea {
  width: 100%;
  min-height: 140px;
  background: #0f1115;
  color: #e6e6e6;
  border: 1px solid #2a3140;
  border-radius: 10px;
  padding: 0.9rem;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
  outline: none;
}
textarea:focus { border-color: #4f8cff; }

.msg { margin-top: 0.8rem; font-size: 0.9rem; min-height: 1.2rem; }
.msg.ok { color: #4ade80; }
.msg.err { color: #f87171; }

.list-wrap {
  flex: 1;
  padding: 1.5rem;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
}

.notes-list { display: flex; flex-direction: column; gap: 1rem; }

.note {
  background: #161a22;
  border: 1px solid #232936;
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

.note-date {
  font-size: 0.8rem;
  color: #8a93a6;
  margin-bottom: 0.6rem;
}

.note-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 0.9rem;
  line-height: 1.7;
}

.note-actions { display: flex; gap: 0.5rem; }

.empty { text-align: center; color: #8a93a6; padding: 3rem 1rem; }

.row { display: flex; gap: 0.6rem; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}
.modal-content { max-width: 560px; }
