/* Page-specific styles for /notes. Loaded before app.css; later global polish still wins. */

/* Apple Notes inspired workspace for /notes. */
.notes-app{
  display:grid;
  grid-template-columns:minmax(250px,320px) minmax(0,1fr);
  min-height:calc(100vh - 64px);
  overflow:hidden;
  border:1px solid rgba(29,29,31,.09);
  border-radius:28px;
  background:rgba(255,255,255,.72);
  box-shadow:0 24px 70px rgba(16,24,40,.09);
  backdrop-filter:saturate(180%) blur(18px);
  -webkit-backdrop-filter:saturate(180%) blur(18px);
}

.notes-list-pane{
  min-width:0;
  border-right:1px solid rgba(29,29,31,.10);
  background:rgba(247,247,248,.88);
  padding:18px;
  overflow:auto;
}

.notes-pane-head,
.notes-detail-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.notes-pane-title{
  color:#333336;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.03em;
}

.notes-pane-sub{
  color:#8e8e93;
  font-size:13px;
  font-weight:650;
  margin-top:2px;
}

.notes-icon-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 13px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#3a3a3c;
  font-weight:750;
  text-decoration:none;
  box-shadow:0 8px 24px rgba(16,24,40,.06);
  cursor:pointer;
  white-space:nowrap;
}

.notes-icon-btn:hover{
  background:#fff;
  text-decoration:none;
}

.notes-danger:hover{
  color:#d92d20;
  background:#fff1f0;
}

.notes-search{
  display:flex;
  align-items:center;
  gap:8px;
  margin:18px 0 12px;
  padding:0 14px;
  min-height:44px;
  border-radius:999px;
  background:#fff;
  color:#8e8e93;
  box-shadow:inset 0 0 0 1px rgba(29,29,31,.04);
}

.notes-search input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:#1d1d1f;
  font-size:15px;
}

.notes-compose{
  display:grid;
  gap:10px;
  margin-bottom:18px;
  padding:12px;
  border-radius:20px;
  background:#fff;
  box-shadow:0 12px 30px rgba(16,24,40,.055);
}

.notes-compose input{
  min-height:44px;
  border:0;
  outline:0;
  border-radius:14px;
  padding:0 14px;
  background:#f5f5f7;
  color:#1d1d1f;
  font:inherit;
}

.notes-compose button{
  justify-self:end;
  min-height:36px;
  padding:0 15px;
  border:0;
  border-radius:999px;
  background:var(--accent,#1769e0);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.notes-folder-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:2px 2px 14px;
  -webkit-overflow-scrolling:touch;
}

.notes-folder-tabs a{
  flex:0 0 auto;
  padding:8px 13px;
  border-radius:999px;
  background:#f5f5f7;
  color:#667085;
  font-weight:800;
  font-size:13px;
  text-decoration:none;
}

.notes-folder-tabs a.is-active{
  background:#e8f1ff;
  color:#0875e1;
}

.notes-section-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:6px 2px 10px;
  color:#6e6e73;
  font-size:13px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
}

.notes-note-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.notes-list-item{
  display:grid;
  grid-template-columns:14px minmax(0,1fr);
  gap:12px;
  align-items:start;
  padding:14px 14px;
  border-radius:18px;
  color:#1d1d1f;
  text-decoration:none;
  border:1px solid transparent;
}

.notes-list-item:hover{
  background:rgba(255,255,255,.74);
  text-decoration:none;
}

.notes-list-item.is-active{
  background:#dcdcdf;
  box-shadow:inset 0 0 0 1px rgba(29,29,31,.04);
}

.notes-list-dot{
  width:10px;
  height:10px;
  margin-top:7px;
  border-radius:50%;
  background:var(--accent,#1769e0);
}

.notes-list-item.is-done .notes-list-dot{
  background:#34c759;
}

.notes-list-main{
  min-width:0;
}

.notes-list-main b{
  display:block;
  overflow:hidden;
  color:#242426;
  font-size:16px;
  font-weight:850;
  line-height:1.25;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.notes-list-main small{
  display:block;
  overflow:hidden;
  margin-top:5px;
  color:#7b7b80;
  font-size:14px;
  line-height:1.3;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.notes-empty-list{
  padding:18px 8px;
  color:#8e8e93;
  text-align:center;
}

.notes-detail-pane{
  min-width:0;
  padding:18px 26px 26px;
  overflow:auto;
  background:rgba(255,255,255,.86);
}

.notes-detail-toolbar{
  justify-content:flex-end;
  min-height:50px;
  flex-wrap:wrap;
}

.notes-detail-toolbar form{
  margin:0;
}

.notes-back-list{
  display:none!important;
}

.notes-detail-meta{
  margin:22px 0 18px;
  color:#8e8e93;
  font-size:14px;
  font-weight:650;
  text-align:center;
}

.notes-detail-editor{
  max-width:760px;
  margin:0 auto;
}

.notes-object-head{
  max-width:760px;
  margin:0 auto 16px;
  padding:22px 24px;
  border:1px solid rgba(23,105,224,.12);
  border-radius:26px;
  background:linear-gradient(180deg,#fff,#f8fbff);
  box-shadow:0 18px 42px rgba(16,24,40,.055);
}

.notes-object-head p{
  margin:0 0 8px;
  color:var(--accent,#1769e0);
  font-size:12px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.notes-object-head h1{
  margin:0;
  color:#1d1d1f;
  font-size:34px;
  line-height:1.08;
  letter-spacing:-.045em;
}

.notes-object-head span{
  display:block;
  margin-top:10px;
  color:#667085;
  font-weight:700;
}

.notes-add-plan{
  max-width:760px;
  margin:0 auto 18px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  padding:8px;
  border:1px solid rgba(23,105,224,.12);
  border-radius:22px;
  background:#fff;
  box-shadow:0 14px 32px rgba(16,24,40,.055);
}

.notes-add-plan input{
  min-height:42px;
  border:0;
  outline:0;
  border-radius:16px;
  padding:0 14px;
  background:#f5f7fb;
  color:#1d1d1f;
  font:inherit;
}

.notes-add-plan button{
  min-height:42px;
  padding:0 16px;
  border:0;
  border-radius:999px;
  background:var(--accent,#1769e0);
  color:#fff;
  font-weight:850;
  cursor:pointer;
}

.notes-editor-title{
  display:grid;
  grid-template-columns:28px minmax(0,1fr);
  align-items:start;
  gap:12px;
  margin-bottom:14px;
  color:#4a4a4f;
  font-size:22px;
  font-weight:760;
  line-height:1.3;
  letter-spacing:-.03em;
}

.notes-check-circle{
  position:relative;
  width:44px;
  height:44px;
  margin:-7px 0 0 -11px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:14px;
  color:#fff;
  font-size:14px;
  font-weight:900;
  line-height:1;
  background:transparent;
  cursor:pointer;
  text-align:center;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.notes-check-circle::before{
  content:"";
  position:absolute;
  width:22px;
  height:22px;
  border:2px solid #c7c7cc;
  border-radius:50%;
  background:#fff;
  transition:background .12s,border-color .12s;
}

.notes-check-circle:hover::before{
  border-color:var(--accent,#1769e0);
}

.notes-detail-editor.is-done .notes-check-circle{
  color:#fff;
}

.notes-detail-editor.is-done .notes-check-circle::before,
.notes-check-item.is-checked .notes-check-circle::before{
  border-color:var(--accent,#1769e0);
  background:var(--accent,#1769e0);
}

.notes-detail-editor.is-done .notes-editor-title{
  color:#8e8e93;
  text-decoration:line-through;
}

.notes-detail-editor textarea{
  width:100%;
  min-height:360px;
  resize:vertical;
  border:0;
  border-radius:0;
  padding:8px 0 18px 40px;
  background:transparent;
  color:#1d1d1f;
  font:inherit;
  font-size:18px;
  line-height:1.58;
  outline:0;
}

.notes-detail-editor textarea:focus{
  box-shadow:none;
}

.notes-checklist{
  max-width:760px;
  margin:18px auto 26px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.notes-empty-plan{
  margin:0;
  padding:18px 20px;
  border:1px dashed rgba(23,105,224,.24);
  border-radius:20px;
  background:#f8fbff;
  color:#667085;
  font-weight:700;
}

.notes-check-item{
  display:grid;
  grid-template-columns:30px minmax(0,1fr);
  align-items:start;
  gap:12px;
  margin:0;
  color:#3f3f46;
  font-size:21px;
  line-height:1.35;
  letter-spacing:-.025em;
}

.notes-check-item .notes-check-circle{
  margin-top:-8px;
}

.notes-check-circle{
  color:#fff;
}

.notes-check-circle{
  text-decoration:none;
}

.notes-check-item.is-checked span{
  color:#8e8e93;
  text-decoration:line-through;
  text-decoration-thickness:2px;
  text-decoration-color:rgba(23,105,224,.55);
}

.notes-raw-editor{
  max-width:760px;
  margin:0 auto;
  border-top:1px solid rgba(29,29,31,.08);
  padding-top:14px;
}

.notes-raw-editor>summary{
  cursor:pointer;
  color:#667085;
  font-weight:750;
  list-style:none;
}

.notes-raw-editor>summary::-webkit-details-marker{
  display:none;
}

.notes-raw-editor[open]>summary{
  margin-bottom:12px;
}

.notes-editor-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
}

.notes-detail-empty{
  min-height:55vh;
  display:grid;
  place-items:center;
  align-content:center;
  text-align:center;
}

.notes-empty-icon{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  border-radius:22px;
  background:#f5f5f7;
  color:#8e8e93;
  font-size:26px;
}

.notes-detail-empty h2{
  margin:14px 0 4px;
}

@media (max-width:640px){
  .notes-app{
    grid-template-columns:1fr;
    overflow:visible;
  }

  .notes-list-pane{
    border-right:0;
    border-bottom:1px solid rgba(29,29,31,.10);
    max-height:none;
    overflow:auto;
  }

  .notes-note-list{
    max-height:min(58vh,560px);
    overflow:auto;
    padding-bottom:4px;
    -webkit-overflow-scrolling:touch;
  }

  .notes-detail-pane{
    min-height:55vh;
    overflow:visible;
  }

  .notes-detail-toolbar{
    justify-content:space-between;
    gap:8px;
  }

  .notes-back-list{
    display:inline-flex!important;
  }

  .notes-object-head{
    padding:18px;
    border-radius:22px;
  }

  .notes-object-head h1{
    font-size:28px;
  }

  .notes-add-plan{
    grid-template-columns:1fr;
    border-radius:20px;
  }
}

@media (max-width:560px){
  .notes-app{
    border-radius:22px;
    min-height:auto;
  }

  .notes-list-pane,
  .notes-detail-pane{
    padding:14px;
  }

  .notes-pane-head{
    gap:10px;
  }

  .notes-pane-title{
    font-size:22px;
  }

  .notes-compose{
    border-radius:18px;
    gap:8px;
    margin-bottom:12px;
    padding:10px;
  }

  .notes-compose button,
  .notes-add-plan button{
    width:100%;
  }

  .notes-compose input{
    min-height:40px;
  }

  .notes-section-label{
    margin-top:2px;
  }

  .notes-list-item{
    padding:12px;
    border-radius:16px;
  }

  .notes-detail-meta{
    margin:14px 0;
    text-align:left;
  }

  .notes-object-head{
    margin-bottom:12px;
    padding:16px;
  }

  .notes-object-head h1{
    font-size:24px;
    letter-spacing:-.035em;
  }

  .notes-checklist{
    margin-top:14px;
    gap:12px;
  }

  .notes-check-item{
    font-size:18px;
    grid-template-columns:28px minmax(0,1fr);
    gap:10px;
  }

  .notes-editor-title{
    font-size:19px;
  }

  .notes-detail-editor textarea{
    min-height:260px;
    padding-left:0;
  }

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

  .notes-editor-actions .btn{
    width:100%;
  }
}
