/* ===== Reset & Base ===== */
.notes-app *, .notes-app *::before, .notes-app *::after { box-sizing: border-box; margin: 0; padding: 0; }

.notes-app {
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  overflow: hidden;
  transition: background 0.35s ease, color 0.35s ease;
  position: relative;
  display: block;
}

/* Dark Theme Base */
.notes-app[data-theme="dark"] {
  background: #141414;
  color: #f0f0f0;
}

/* Light Theme Base */
.notes-app[data-theme="light"] {
  background: #f5f5f5;
  color: #1a1a1a;
}

.notes-app button {
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}
.brand-logo{
    width:42px;
    height:42px;
    object-fit:contain;
    border-radius:10px;
}

.brand-name{
    font-size:20px;
    font-weight:700;
    color:#fff;
}

.notes-app input, .notes-app textarea {
  font-family: 'Inter', system-ui, sans-serif;
  outline: none;
  border: none;
  background: none;
}

.notes-app[data-theme="dark"] input, .notes-app[data-theme="dark"] textarea {
  color: #f0f0f0;
}

.notes-app[data-theme="light"] input, .notes-app[data-theme="light"] textarea {
  color: #1a1a1a;
}

/* ===== Layout ===== */
.notes-app .app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== Sidebar ===== */
.notes-app .sidebar {
  width: 220px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform 0.35s ease, background 0.35s ease;
  z-index: 200;
  border-right: 1px solid transparent;
}

.notes-app[data-theme="dark"] .sidebar {
  background: #1c1c1c;
  border-right-color: #2e2e2e;
}

.notes-app[data-theme="light"] .sidebar {
  background: #ffffff;
  border-right-color: #e5e5e5;
}

.notes-app .sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px !important;
  border-bottom: 1px solid transparent !important;
}

.notes-app[data-theme="dark"] .sidebar-header { border-bottom-color: #2e2e2e; }
.notes-app[data-theme="light"] .sidebar-header { border-bottom-color: #e5e5e5; }

.notes-app .app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-app .brand-icon {
  font-size: 22px;
}

.notes-app[data-theme="dark"] .brand-icon { color: #4f8ef7; }
.notes-app[data-theme="light"] .brand-icon { color: #2563eb; }

.notes-app .brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.notes-app[data-theme="dark"] .brand-name { color: #f0f0f0; }
.notes-app[data-theme="light"] .brand-name { color: #1a1a1a; }

.notes-app .sidebar-nav {
  flex: 1;
  padding: 12px 8px !important;
  overflow-y: auto;
  scrollbar-width: none;
}

.notes-app .sidebar-nav::-webkit-scrollbar { display: none; }

.notes-app .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  text-align: left;
  position: relative;
}

.notes-app[data-theme="dark"] .nav-item { color: #8a8a8a; }
.notes-app[data-theme="light"] .nav-item { color: #6b6b6b; }

.notes-app .nav-item i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notes-app[data-theme="dark"] .nav-item:hover { background: #2a2a2a; color: #f0f0f0; }
.notes-app[data-theme="light"] .nav-item:hover { background: #f0f0f0; color: #1a1a1a; }

.notes-app[data-theme="dark"] .nav-item.active { background: rgba(79, 142, 247, 0.12); color: #4f8ef7; }
.notes-app[data-theme="light"] .nav-item.active { background: rgba(37, 99, 235, 0.08); color: #2563eb; }

.notes-app .nav-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px !important;
  border-radius: 20px !important;
  transition: background 0.2s ease, color 0.2s ease;
}

.notes-app[data-theme="dark"] .nav-count { color: #5a5a5a; background: #2a2a2a; }
.notes-app[data-theme="light"] .nav-count { color: #a0a0a0; background: #f0f0f0; }

.notes-app[data-theme="dark"] .nav-item.active .nav-count { background: rgba(79, 142, 247, 0.12); color: #4f8ef7; }
.notes-app[data-theme="light"] .nav-item.active .nav-count { background: rgba(37, 99, 235, 0.08); color: #2563eb; }

.notes-app .nav-divider {
  height: 1px;
  margin: 8px 12px;
}

.notes-app[data-theme="dark"] .nav-divider { background: #2e2e2e; }
.notes-app[data-theme="light"] .nav-divider { background: #e5e5e5; }

.notes-app .color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.notes-app .sidebar-footer {
  padding: 16px;
  border-top: 1px solid transparent;
}

.notes-app[data-theme="dark"] .sidebar-footer { border-top-color: #2e2e2e; }
.notes-app[data-theme="light"] .sidebar-footer { border-top-color: #e5e5e5; }

.notes-app .theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.notes-app[data-theme="dark"] .theme-toggle { color: #8a8a8a; }
.notes-app[data-theme="light"] .theme-toggle { color: #6b6b6b; }

.notes-app[data-theme="dark"] .theme-toggle:hover { background: #2a2a2a; color: #f0f0f0; }
.notes-app[data-theme="light"] .theme-toggle:hover { background: #f0f0f0; color: #1a1a1a; }

.notes-app .theme-toggle i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notes-app[data-theme="dark"] .icon-sun { display: none; }
.notes-app[data-theme="light"] .icon-moon { display: none; }
.notes-app[data-theme="dark"] .icon-moon { display: block; }
.notes-app[data-theme="light"] .icon-sun { display: block; }

/* ===== Main Content ===== */
.notes-app .main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.notes-app[data-theme="dark"] .main-content { background: #141414; }
.notes-app[data-theme="light"] .main-content { background: #f5f5f5; }

.notes-app .main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid transparent;
  gap: 16px;
  flex-shrink: 0;
}

.notes-app[data-theme="dark"] .main-header { background: #141414; border-bottom-color: #2e2e2e; }
.notes-app[data-theme="light"] .main-header { background: #f5f5f5; border-bottom-color: #e5e5e5; }

.notes-app .main-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notes-app .page-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.notes-app[data-theme="dark"] .page-title { color: #f0f0f0; }
.notes-app[data-theme="light"] .page-title { color: #1a1a1a; }

.notes-app .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Icon Button ===== */
.notes-app .icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px !important;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
	padding:10px !important
}

.notes-app[data-theme="dark"] .icon-btn { color: #8a8a8a; }
.notes-app[data-theme="light"] .icon-btn { color: #6b6b6b; }

.notes-app .icon-btn i {
  font-size: 18px;
}

.notes-app[data-theme="dark"] .icon-btn:hover { background: #2a2a2a; color: #f0f0f0; }
.notes-app[data-theme="light"] .icon-btn:hover { background: #f0f0f0; color: #1a1a1a; }

.notes-app .menu-toggle { display: none; }

/* ===== Search ===== */
.notes-app .search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.notes-app .search-icon {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.notes-app[data-theme="dark"] .search-icon { color: #5a5a5a; }
.notes-app[data-theme="light"] .search-icon { color: #a0a0a0; }

.notes-app .search-input {
  width: 220px;
  height: 34px;
  padding: 0 32px 0 32px !important;
  border: 1px solid transparent;
  border-radius: 10px !important;
  font-size: 13px;
  transition: border-color 0.2s ease, width 0.2s ease;
}

.notes-app[data-theme="dark"] .search-input { background: #242424 !important; border-color: #2e2e2e !important; color: #f0f0f0; }
.notes-app[data-theme="light"] .search-input { background: #ffffff !important; border-color: #e5e5e5 !important; color: #1a1a1a; }

.notes-app[data-theme="dark"] .search-input::placeholder { color: #5a5a5a !important; }
.notes-app[data-theme="light"] .search-input::placeholder { color: #a0a0a0 !important; }

.notes-app[data-theme="dark"] .search-input:focus { border-color: #4f8ef7; width: 260px; }
.notes-app[data-theme="light"] .search-input:focus { border-color: #2563eb; width: 260px; }

.notes-app .search-clear {
  position: absolute;
  right: 4px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.notes-app .search-clear i { font-size: 14px; }

/* ===== Sort ===== */
.notes-app .sort-wrapper {
  position: relative;
}

.notes-app .sort-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  border: 1px solid transparent;
  border-radius: 10px !important;
  z-index: 100;
  min-width: 150px;
  overflow: hidden;
}

.notes-app[data-theme="dark"] .sort-dropdown { background: #242424; border-color: #2e2e2e; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.notes-app[data-theme="light"] .sort-dropdown { background: #ffffff; border-color: #e5e5e5; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.notes-app .sort-dropdown.open { display: block; }

.notes-app .sort-option {
  display: block;
  width: 100%;
  padding: 12px 16px !important;
  font-size: 13px;
  text-align: left;
  transition: background 0.2s ease, color 0.2s ease;
}

.notes-app[data-theme="dark"] .sort-option { color: #8a8a8a; }
.notes-app[data-theme="light"] .sort-option { color: #6b6b6b; }

.notes-app[data-theme="dark"] .sort-option:hover { background: #2a2a2a; color: #f0f0f0; }
.notes-app[data-theme="light"] .sort-option:hover { background: #f0f0f0; color: #1a1a1a; }

.notes-app[data-theme="dark"] .sort-option.active { color: #4f8ef7; font-weight: 600; }
.notes-app[data-theme="light"] .sort-option.active { color: #2563eb; font-weight: 600; }

/* ===== Notes Grid ===== */
.notes-app .notes-grid {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  align-content: start;
}

.notes-app .notes-grid::-webkit-scrollbar { width: 6px; }
.notes-app .notes-grid::-webkit-scrollbar-track { background: transparent; }
.notes-app .notes-grid::-webkit-scrollbar-thumb { border-radius: 3px; }
.notes-app[data-theme="dark"] .notes-grid::-webkit-scrollbar-thumb { background: #3a3a3a; }
.notes-app[data-theme="light"] .notes-grid::-webkit-scrollbar-thumb { background: #d0d0d0; }

/* ===== Note Card ===== */
.notes-app .note-card {
  border: 1px solid transparent;
  border-radius: 14px !important;
  padding: 16px !important;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
/*   overflow: hidden; */
}

.notes-app[data-theme="dark"] .note-card { background: #1c1c1c; border-color: #2e2e2e; }
.notes-app[data-theme="light"] .note-card { background: #ffffff; border-color: #e5e5e5; }

.notes-app .note-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notes-app .note-card.color-blue::before { background: #3b82f6; opacity: 1; }
.notes-app .note-card.color-green::before { background: #10b981; opacity: 1; }
.notes-app .note-card.color-yellow::before { background: #f59e0b; opacity: 1; }
.notes-app .note-card.color-red::before { background: #ef4444; opacity: 1; }
.notes-app .note-card.color-pink::before { background: #ec4899; opacity: 1; }

.notes-app .note-card:hover {
  transform: translateY(-2px);
}

.notes-app[data-theme="dark"] .note-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.5); border-color: #3a3a3a; }
.notes-app[data-theme="light"] .note-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); border-color: #d0d0d0; }

.notes-app[data-theme="dark"] .note-card.pinned { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.25); }
.notes-app[data-theme="light"] .note-card.pinned { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.25); }

.notes-app .note-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notes-app .note-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.notes-app[data-theme="dark"] .note-card-title { color: #f0f0f0; }
.notes-app[data-theme="light"] .note-card-title { color: #1a1a1a; }

.notes-app .note-card-pin {
  font-size: 16px;
  color: #f59e0b;
  flex-shrink: 0;
}

.notes-app .note-card-preview {
  font-size: 12.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  flex: 1;
}

.notes-app[data-theme="dark"] .note-card-preview { color: #8a8a8a; }
.notes-app[data-theme="light"] .note-card-preview { color: #6b6b6b; }

.notes-app .note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.notes-app .note-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px !important;
  border-radius: 20px !important;
  text-transform: capitalize;
}

.notes-app .note-tag.tag-work { background: rgba(59,130,246,0.15); color: #3b82f6; }
.notes-app .note-tag.tag-personal { background: rgba(16,185,129,0.15); color: #10b981; }
.notes-app .note-tag.tag-ideas { background: rgba(245,158,11,0.15); color: #f59e0b; }

.notes-app .note-card-date {
  font-size: 11px;
}

.notes-app[data-theme="dark"] .note-card-date { color: #5a5a5a; }
.notes-app[data-theme="light"] .note-card-date { color: #a0a0a0; }

/* ===== Empty State ===== */
.notes-app .empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px !important;
  pointer-events: none;
}

.notes-app .empty-state > * { pointer-events: auto; }

.notes-app .empty-state i {
  font-size: 56px;
  margin-bottom: 8px;
}

.notes-app[data-theme="dark"] .empty-state svg { color: #5a5a5a; }
.notes-app[data-theme="light"] .empty-state svg { color: #a0a0a0; }

.notes-app .empty-state h3 {
  font-size: 17px;
  font-weight: 600;
}

.notes-app[data-theme="dark"] .empty-state h3 { color: #8a8a8a; }
.notes-app[data-theme="light"] .empty-state h3 { color: #6b6b6b; }

.notes-app .empty-state p {
  font-size: 13.5px;
  text-align: center;
  max-width: 260px;
  line-height: 1.6;
}

.notes-app[data-theme="dark"] .empty-state p { color: #5a5a5a; }
.notes-app[data-theme="light"] .empty-state p { color: #a0a0a0; }

/* ===== FAB ===== */
.notes-app .fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	padding:15px !important;
}

.notes-app[data-theme="dark"] .fab { background: #4f8ef7; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.notes-app[data-theme="light"] .fab { background: #2563eb; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.notes-app .fab i { font-size: 22px; }
.notes-app .fab:hover { transform: scale(1.08); }
.notes-app[data-theme="dark"] .fab:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.7); }
.notes-app[data-theme="light"] .fab:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

/* ===== Buttons ===== */
.notes-app .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px !important;
  color: #fff;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.notes-app[data-theme="dark"] .btn-primary { background: #4f8ef7; }
.notes-app[data-theme="light"] .btn-primary { background: #2563eb; }

.notes-app[data-theme="dark"] .btn-primary:hover { background: #6ba3f9; transform: translateY(-1px); }
.notes-app[data-theme="light"] .btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); }

.notes-app .btn-secondary {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.notes-app[data-theme="dark"] .btn-secondary { background: #2a2a2a; color: #8a8a8a; }
.notes-app[data-theme="light"] .btn-secondary { background: #f0f0f0; color: #6b6b6b; }

.notes-app[data-theme="dark"] .btn-secondary:hover { background: #303030; color: #f0f0f0; }
.notes-app[data-theme="light"] .btn-secondary:hover { background: #e8e8e8; color: #1a1a1a; }

.notes-app .btn-danger {
  padding: 8px 20px !important;
  background: #ef4444;
  color: #fff;
  border-radius: 10px !important;
  font-size: 13.5px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.notes-app .btn-danger:hover { opacity: 0.88; }

/* ===== Modal backdrop ===== */
.notes-app .modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

.notes-app .modal-backdrop.open { display: block; }

/* ===== Editor Modal ===== */
.notes-app .editor-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(680px, calc(100vw - 48px));
  height: min(600px, calc(100vh - 80px));
  border: 1px solid transparent;
  border-radius: 20px;
  z-index: 400;
  flex-direction: column;
  overflow: hidden;
}

.notes-app[data-theme="dark"] .editor-modal { background: #242424; border-color: #2e2e2e; box-shadow: 0 12px 40px rgba(0,0,0,0.7); }
.notes-app[data-theme="light"] .editor-modal { background: #ffffff; border-color: #e5e5e5; box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

.notes-app .editor-modal.open {
  display: flex;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translate(-50%, -42%); opacity: 0; }
  to { transform: translate(-50%, -48%); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.notes-app .editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid transparent;
  flex-shrink: 0;
  gap: 12px;
}

.notes-app[data-theme="dark"] .editor-header { border-bottom-color: #2e2e2e; }
.notes-app[data-theme="light"] .editor-header { border-bottom-color: #e5e5e5; }

.notes-app .editor-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notes-app .editor-date {
  font-size: 12px;
}

.notes-app[data-theme="dark"] .editor-date { color: #5a5a5a; }
.notes-app[data-theme="light"] .editor-date { color: #a0a0a0; }

.notes-app .autosave-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: #10b981;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notes-app .autosave-indicator i { font-size: 13px; }
.notes-app .autosave-indicator.visible { opacity: 1; }

.notes-app .editor-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notes-app .pin-btn.active { color: #f59e0b; }
.notes-app[data-theme="dark"] .delete-btn:hover { color: #ef4444; background: rgba(239, 68, 68, 0.12); }
.notes-app[data-theme="light"] .delete-btn:hover { color: #dc2626; background: rgba(220, 38, 38, 0.08); }

/* Color picker */
.notes-app .color-picker-wrapper { position: relative; }

.notes-app .color-picker-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  padding: 8px !important;
  z-index: 10;
  flex-direction: row;
  gap: 8px;
}

.notes-app[data-theme="dark"] .color-picker-dropdown { background: #242424; border-color: #2e2e2e; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.notes-app[data-theme="light"] .color-picker-dropdown { background: #ffffff; border-color: #e5e5e5; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

.notes-app .color-picker-dropdown.open { display: flex; }

.notes-app .color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notes-app .color-swatch i { font-size: 14px; }
.notes-app[data-theme="dark"] .color-swatch i { color: #5a5a5a; }
.notes-app[data-theme="light"] .color-swatch i { color: #a0a0a0; }

.notes-app .color-swatch:hover { transform: scale(1.18); }

.notes-app[data-theme="dark"] .color-swatch.selected { border-color: #4f8ef7; }
.notes-app[data-theme="light"] .color-swatch.selected { border-color: #2563eb; }

.notes-app[data-theme="dark"] .color-swatch[data-color="none"].selected { border-color: #3a3a3a; }
.notes-app[data-theme="light"] .color-swatch[data-color="none"].selected { border-color: #d0d0d0; }

/* Editor body */
.notes-app .editor-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px;
  gap: 12px;
}

.notes-app .editor-title-input {
  font-size: 22px;
  font-weight: 700;
  width: 100%;
  background: transparent;
  letter-spacing: -0.4px;
}

.notes-app[data-theme="dark"] .editor-title-input { color: #f0f0f0; caret-color: #4f8ef7; }
.notes-app[data-theme="light"] .editor-title-input { color: #1a1a1a; caret-color: #2563eb; }

.notes-app[data-theme="dark"] .editor-title-input::placeholder { color: #5a5a5a; }
.notes-app[data-theme="light"] .editor-title-input::placeholder { color: #a0a0a0; }

.notes-app .tag-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.notes-app .tag-btn {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  transition: background 0.2s ease, color 0.2s ease;
}

.notes-app[data-theme="dark"] .tag-btn { color: #5a5a5a; background: #2a2a2a; }
.notes-app[data-theme="light"] .tag-btn { color: #a0a0a0; background: #f0f0f0; }

.notes-app[data-theme="dark"] .tag-btn:hover { color: #8a8a8a; }
.notes-app[data-theme="light"] .tag-btn:hover { color: #6b6b6b; }

.notes-app[data-theme="dark"] .tag-btn.active { background: rgba(79, 142, 247, 0.12); color: #4f8ef7; }
.notes-app[data-theme="light"] .tag-btn.active { background: rgba(37, 99, 235, 0.08); color: #2563eb; }

.notes-app .tag-btn[data-tag="work"].active { background: rgba(59,130,246,0.15); color: #3b82f6; }
.notes-app .tag-btn[data-tag="personal"].active { background: rgba(16,185,129,0.15); color: #10b981; }
.notes-app .tag-btn[data-tag="ideas"].active { background: rgba(245,158,11,0.15); color: #f59e0b; }

.notes-app .editor-content-input {
  flex: 1;
  width: 100%;
  resize: none;
  font-size: 14.5px;
  line-height: 1.7;
  background: transparent;
}

.notes-app[data-theme="dark"] .editor-content-input { color: #f0f0f0; caret-color: #4f8ef7; }
.notes-app[data-theme="light"] .editor-content-input { color: #1a1a1a; caret-color: #2563eb; }

.notes-app[data-theme="dark"] .editor-content-input::placeholder { color: #5a5a5a; }
.notes-app[data-theme="light"] .editor-content-input::placeholder { color: #a0a0a0; }

/* ===== Confirm Modal ===== */
.notes-app .confirm-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 500;
  align-items: center;
  justify-content: center;
}

.notes-app .confirm-backdrop.open { display: flex; animation: fadeIn 0.2s ease; }

.notes-app .confirm-box {
  border: 1px solid transparent;
  border-radius: 20px !important;
  padding: 32px 24px !important;
  width: min(380px, calc(100vw - 48px));
  text-align: center;
  animation: slideUp 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.notes-app[data-theme="dark"] .confirm-box { background: #242424; border-color: #2e2e2e; box-shadow: 0 12px 40px rgba(0,0,0,0.7); }
.notes-app[data-theme="light"] .confirm-box { background: #ffffff; border-color: #e5e5e5; box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

.notes-app .confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.notes-app .confirm-icon i {
  font-size: 26px;
  color: #f59e0b;
}

.notes-app .confirm-box h3 {
  font-size: 17px;
  font-weight: 700;
}

.notes-app[data-theme="dark"] .confirm-box h3 { color: #f0f0f0; }
.notes-app[data-theme="light"] .confirm-box h3 { color: #1a1a1a; }

.notes-app .confirm-box p {
  font-size: 13.5px;
  line-height: 1.6;
}

.notes-app[data-theme="dark"] .confirm-box p { color: #8a8a8a; }
.notes-app[data-theme="light"] .confirm-box p { color: #6b6b6b; }

.notes-app .confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ===== Sidebar overlay (mobile) ===== */
.notes-app .sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 900px) {
  .notes-app .sidebar {
    width: 200px;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }

  .notes-app[data-theme="dark"] .sidebar { box-shadow: 0 12px 40px rgba(0,0,0,0.7); }
  .notes-app[data-theme="light"] .sidebar { box-shadow: 0 12px 40px rgba(0,0,0,0.15); }

  .notes-app .sidebar.open { transform: translateX(0); }
  .notes-app .sidebar-overlay.open { display: block; }
  .notes-app .menu-toggle { display: flex; }

  .notes-app .search-input { width: 180px; }
  .notes-app .search-input:focus { width: 200px; }

  .notes-app .notes-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    padding: 16px;
  }
}

/* Mobile */
@media (max-width: 580px) {
  .notes-app .main-header {
    padding: 12px 16px;
  }

  .notes-app .page-title { font-size: 16px; }

  .notes-app .search-input { width: 140px; }
  .notes-app .search-input:focus { width: 160px; }

  .notes-app .notes-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
  }

  .notes-app .fab { display: flex; }

  .notes-app .editor-modal {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform: none;
    border-radius: 0;
    border: none;
  }

  .notes-app .editor-modal.open {
    animation: slideUpMobile 0.25s ease;
  }

  @keyframes slideUpMobile {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (max-width: 360px) {
	.notes-app .header-actions{
		display:block
	}
  .notes-app .notes-grid { grid-template-columns: 1fr; }
}
