﻿/* NOTES PAGE */
.notes-container {
  padding: 16px;
  padding-bottom: 100px;
}

.notes-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.notes-search-box {
  flex: 1;
  min-width: 180px;
}

#notesSearchInput {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #f7f3eb;
  color: #1e293b;
  font-size: 15px;
}

.notes-sort-select {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #f7f3eb;
  color: #1e293b;
  font-size: 15px;
}

.notes-add-btn {
  background: #1e3a8a;
  color: #f5e6c8;
  border: none;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 6px 16px rgba(30,58,138,0.18);
}

.notes-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tab-btn {
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: #e8e4d8;
  color: #1e293b;
  cursor: pointer;
  font-size: 13px;
}

.tab-btn.active {
  background: #1e3a8a;
  color: #f5e6c8;
}

.notes-count {
  color: #475569;
  font-size: 13px;
  margin-bottom: 12px;
}

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

.note-card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(15,23,42,0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(15,23,42,0.12);
}

.note-card-title {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.note-card-preview {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  min-height: 60px;
  margin-bottom: 14px;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #64748b;
}

.note-card-category {
  background: rgba(30,58,138,0.08);
  color: #1e3a8a;
  padding: 4px 10px;
  border-radius: 999px;
}

.note-card-pin {
  font-size: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.48);
}

.modal-panel {
  position: relative;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  background: #f8f3e8;
  border-radius: 24px;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(15,23,42,0.2);
}

.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.editor-sm-btn {
  border: none;
  border-radius: 14px;
  padding: 9px 14px;
  background: #e8e4d8;
  color: #111827;
  cursor: pointer;
  font-size: 13px;
}

.editor-sm-btn.primary {
  background: #1e3a8a;
  color: #f5e6c8;
}

.editor-sm-btn.danger {
  background: #c2410c;
  color: #fff;
}

.note-title {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.note-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.note-category-select {
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  font-size: 14px;
  color: #1e293b;
}

.note-edited-label {
  color: #475569;
  font-size: 13px;
}

.note-content {
  width: 100%;
  min-height: 260px;
  border: none;
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  font-size: 15px;
  line-height: 1.7;
  color: #1e293b;
  resize: vertical;
}

@media (max-width: 640px) {
  .notes-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-header {
    flex-direction: column;
    align-items: stretch;
  }

  .editor-actions {
    width: 100%;
    justify-content: space-between;
  }
}
