/* ═══════════════════════════════════════════
   NOT DEFTERİ — notes.css  (prefix: nt-)
   ═══════════════════════════════════════════ */

.nt-page {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    width: 100%;
    min-height: calc(100vh - 60px);
}

/* ── Topbar ── */
.nt-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--white);
    border-bottom: 1.5px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}
.nt-back {
    font-size: 1.1rem;
    border: none;
    background: var(--bg);
    color: var(--ink3);
    cursor: pointer;
    padding: 7px 13px;
    border-radius: 9px;
    font-weight: 700;
    font-family: inherit;
    transition: background .12s;
    flex-shrink: 0;
}
.nt-back:hover { background: var(--border); }
.nt-topbar-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 900;
    color: var(--ink);
}
.nt-new-btn {
    background: var(--color-primary);
    border: none;
    color: #fff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: opacity .15s, transform .15s;
    flex-shrink: 0;
}
.nt-new-btn:hover { opacity: .85; transform: scale(1.05); }

/* ── Toolbar ── */
.nt-toolbar {
    padding: 12px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--white);
    border-bottom: 1.5px solid var(--border);
}
.nt-search {
    width: 100%;
    padding: 9px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--ink);
    font-size: .85rem;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.nt-search:focus { border-color: var(--color-primary); }
.nt-tags-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.nt-tags-scroll::-webkit-scrollbar { display: none; }
.nt-tag-chip {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--ink3);
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all .15s;
}
.nt-tag-chip.active,
.nt-tag-chip:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ── Kota barı ── */
.nt-quota-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
#nt-quota-text {
    font-size: .68rem;
    color: var(--ink3);
    white-space: nowrap;
    font-weight: 600;
}
.nt-quota-track {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}
.nt-quota-fill {
    height: 100%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width .4s;
}

/* ── Not listesi ── */
.nt-list {
    padding: 14px 16px 32px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 12px;
}
.nt-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: var(--ink3);
}
.nt-empty-icon { font-size: 44px; margin-bottom: 12px; }
.nt-empty p { font-size: .85rem; line-height: 1.7; }

/* ── Not kartı ── */
.nt-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, border-color .2s;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.nt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    border-color: var(--color-primary);
}
/* Renk aksanı — sol kenara ince çizgi */
.nt-card[data-color="red"]    { border-left: 4px solid #e63946; }
.nt-card[data-color="green"]  { border-left: 4px solid #16a34a; }
.nt-card[data-color="blue"]   { border-left: 4px solid #2563eb; }
.nt-card[data-color="yellow"] { border-left: 4px solid #f59e0b; }
.nt-card[data-color="purple"] { border-left: 4px solid #9333ea; }
.nt-card[data-color="teal"]   { border-left: 4px solid #0d9488; }

.nt-card-date {
    font-size: .62rem;
    color: var(--ink3);
    text-align: right;
    font-weight: 600;
}
.nt-card-body {
    font-size: .8rem;
    color: var(--ink2);
    line-height: 1.55;
    flex: 1;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}
.nt-card-body mark.hl-yellow { background: #fff3b0; color: #333; border-radius: 2px; padding: 0 2px; }
.nt-card-body mark.hl-green  { background: #bbf7d0; color: #333; border-radius: 2px; padding: 0 2px; }
.nt-card-body mark.hl-red    { background: #fecaca; color: #333; border-radius: 2px; padding: 0 2px; }
.nt-card-body mark.hl-blue   { background: #bfdbfe; color: #333; border-radius: 2px; padding: 0 2px; }
.nt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.nt-card-tag {
    font-size: .6rem;
    font-weight: 700;
    background: var(--color-primary-soft, #ede9fe);
    color: var(--color-primary);
    padding: 2px 8px;
    border-radius: 20px;
}

/* ── Modal overlay ── */
.nt-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.nt-modal-overlay.hidden { display: none; }

/* ── Modal kutusu ── */
.nt-modal {
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 32px;
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: ntSlideUp .22s ease;
    border-top: 3px solid var(--color-primary);
}
@keyframes ntSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.nt-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nt-modal-title {
    font-size: .95rem;
    font-weight: 900;
    color: var(--ink);
}
.nt-modal-close {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--ink3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background .15s;
}
.nt-modal-close:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ── Etiket satırı ── */
.nt-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    background: var(--bg);
    min-height: 40px;
}
.nt-tag-item {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--color-primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.nt-tag-item button {
    background: none;
    border: none;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    line-height: 1;
    transition: color .15s;
}
.nt-tag-item button:hover { color: #fff; }
.nt-tag-input {
    background: none;
    border: none;
    color: var(--ink);
    font-size: .82rem;
    font-family: inherit;
    outline: none;
    min-width: 80px;
    flex: 1;
}
.nt-tag-input::placeholder { color: var(--ink3); }

/* ── Renk seçici ── */
.nt-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-color-label {
    font-size: .7rem;
    font-weight: 700;
    color: var(--ink3);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.nt-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform .15s, border-color .15s;
    flex-shrink: 0;
}
.nt-color-dot:hover,
.nt-color-dot.active { transform: scale(1.25); border-color: var(--ink) !important; }

/* ── Textarea ── */
.nt-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    color: var(--ink);
    font-size: .85rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.nt-textarea:focus { border-color: var(--color-primary); }
.nt-char-counter {
    font-size: .68rem;
    color: var(--ink3);
    text-align: right;
    margin-top: -8px;
    font-weight: 600;
}

/* ── Highlight ── */
.nt-highlight-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: 10px;
    border: 1.5px solid var(--border);
}
.nt-hl-label {
    font-size: .68rem;
    font-weight: 800;
    color: var(--ink3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-right: 2px;
}
.nt-hl-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 800;
    font-size: .75rem;
    transition: transform .15s;
    flex-shrink: 0;
}
.nt-hl-btn:hover { transform: scale(1.2); }

/* ── Modal footer ── */
.nt-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}
.nt-save-btn {
    background: var(--color-primary);
    border: none;
    color: #fff;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .15s;
}
.nt-save-btn:hover { opacity: .85; }
.nt-delete-btn {
    background: var(--bg);
    border: 1.5px solid var(--border);
    color: var(--ink3);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: .8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.nt-delete-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.nt-delete-btn.hidden { display: none; }
