/*
    استایل اصلی PersianKeep - سیستم مدیریت یادداشت فارسی
    Main Stylesheet for PersianKeep - Persian Note Management System
    
    ساختار فایل:
    1. متغیرهای CSS (تم رنگی)
    2. استایل‌های عمومی
    3. سایدبار
    4. هدر
    5. باکس یادداشت جدید
    6. نوار آمار
    7. کارت یادداشت
    8. ویرایشگر (مدال)
    9. اعلان (Toast)
    10. دکمه شناور (FAB)
    11. واکنش‌گرا (Responsive)
*/

/* ============================================================
   1. متغیرهای CSS / CSS Variables
   تغییر رنگ کل برنامه فقط از اینجا انجام می‌شود
   ============================================================ */
:root,
[data-theme="dark"] {
    /* رنگ‌های پس‌زمینه - تیره واقعی (مشکی) */
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #1a1a22;
    --bg-surface: #151519;

    /* رنگ‌های تأکیدی */
    --accent-gold: #e2b714;
    --accent-coral: #ff6b6b;
    --accent-teal: #4ecdc4;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-lime: #84cc16;

    /* رنگ‌های متن */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* مرز و سایه */
    --border-subtle: rgba(255,255,255,0.06);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.5);

    /* گوشه‌ها و انیمیشن */
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* رنگ‌های یادداشت */
    --note-default: rgba(30, 30, 40, 0.8);
    --note-red: rgba(220, 38, 38, 0.15);
    --note-orange: rgba(249, 115, 22, 0.15);
    --note-yellow: rgba(234, 179, 8, 0.15);
    --note-green: rgba(34, 197, 94, 0.15);
    --note-teal: rgba(20, 184, 166, 0.15);
    --note-blue: rgba(59, 130, 246, 0.15);
    --note-purple: rgba(168, 85, 247, 0.15);
    --note-pink: rgba(236, 72, 153, 0.15);
}

/* تم روشن / Light Theme */
[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-surface: #f0f0f2;

    --accent-gold: #c9a10a;
    --accent-coral: #e55555;
    --accent-teal: #2ba89e;
    --accent-purple: #8b3fd6;
    --accent-blue: #2563eb;
    --accent-pink: #d63d8a;
    --accent-orange: #e06510;
    --accent-lime: #65a30d;

    --text-primary: #1a1a2e;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-subtle: rgba(0,0,0,0.08);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.12);

    --note-default: rgba(240, 240, 245, 0.8);
    --note-red: rgba(220, 38, 38, 0.08);
    --note-orange: rgba(249, 115, 22, 0.08);
    --note-yellow: rgba(234, 179, 8, 0.08);
    --note-green: rgba(34, 197, 94, 0.08);
    --note-teal: rgba(20, 184, 166, 0.08);
    --note-blue: rgba(59, 130, 246, 0.08);
    --note-purple: rgba(168, 85, 247, 0.08);
    --note-pink: rgba(236, 72, 153, 0.08);
}

/* ============================================================
   2. استایل‌های عمومی / Global Styles
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* اتمسفر پس‌زمینه */
body::before {
    content: '';
    position: fixed;
    top: -50%; right: -30%;
    width: 80vw; height: 80vw;
    background: radial-gradient(circle, rgba(226,183,20,0.04) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
body::after {
    content: '';
    position: fixed;
    bottom: -40%; left: -20%;
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(78,205,196,0.03) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}

/* ============================================================
   3. سایدبار / Sidebar
   ============================================================ */
.sidebar {
    position: fixed; top: 0; right: 0;
    width: 260px; height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    z-index: 100;
    display: flex; flex-direction: column;
    transition: var(--transition);
}

.sidebar-brand { padding: 28px 24px; border-bottom: 1px solid var(--border-subtle); }

.sidebar-brand h1 {
    font-size: 1.4rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; letter-spacing: -0.5px;
}

.sidebar-brand span {
    font-size: 0.75rem; color: var(--text-muted);
    font-weight: 400; display: block; margin-top: 4px;
}

.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }

.nav-section-title {
    font-size: 0.68rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.5px; padding: 12px 14px 8px;
}

.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
    color: var(--text-secondary); font-size: 0.88rem;
    font-weight: 500; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.nav-item.active { background: rgba(226,183,20,0.1); color: var(--accent-gold); }
.nav-item.active::before {
    content: ''; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%); width: 3px; height: 60%;
    background: var(--accent-gold); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-badge {
    margin-right: auto; background: rgba(255,255,255,0.08);
    padding: 2px 8px; border-radius: 20px; font-size: 0.7rem; color: var(--text-muted);
}
.nav-item.active .nav-badge { background: rgba(226,183,20,0.15); color: var(--accent-gold); }

.label-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-subtle); }
.user-profile {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
}
.user-profile:hover { background: rgba(255,255,255,0.05); }
.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: #1a1a2e;
}
.user-info { flex: 1; }
.user-name { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.user-plan { font-size: 0.68rem; color: var(--text-muted); }

/* ============================================================
   4. محتوای اصلی و هدر / Main Content & Header
   ============================================================ */
.main-content {
    margin-right: 260px; min-height: 100vh;
    position: relative; z-index: 1;
    overflow-x: hidden; min-width: 0;
}

.header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10,10,15,0.8);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 32px; height: 64px;
    display: flex; align-items: center; gap: 16px;
}

.search-container { flex: 1; max-width: 560px; position: relative; }
.search-input {
    width: 100%; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle); border-radius: 12px;
    padding: 10px 16px 10px 42px; color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif; font-size: 0.88rem;
    outline: none; transition: var(--transition); direction: rtl;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
    background: rgba(255,255,255,0.08);
    border-color: rgba(226,183,20,0.3);
    box-shadow: 0 0 0 3px rgba(226,183,20,0.08);
}
.search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
}

.header-actions { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.header-btn {
    width: 40px; height: 40px; border: none; background: transparent;
    color: var(--text-secondary); border-radius: 10px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.header-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }

.view-toggle {
    display: flex; background: rgba(255,255,255,0.04);
    border-radius: 10px; padding: 3px;
}
.view-toggle button {
    padding: 6px 10px; border: none; background: transparent;
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; transition: var(--transition);
    display: flex; align-items: center;
}
.view-toggle button.active { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.page-content { padding: 28px 32px; overflow: hidden; }

/* ============================================================
   5. باکس یادداشت جدید / New Note Box
   ============================================================ */
.new-note-container { max-width: 620px; margin: 0 auto 40px; }
.new-note-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-card); transition: var(--transition);
}
.new-note-box:focus-within {
    border-color: rgba(226,183,20,0.25);
    box-shadow: var(--shadow-hover), 0 0 0 3px rgba(226,183,20,0.06);
}

.new-note-title {
    width: 100%; border: none; background: transparent;
    padding: 18px 20px 6px; color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif; font-size: 1rem;
    font-weight: 600; outline: none; direction: rtl;
}
.new-note-title::placeholder { color: var(--text-muted); font-weight: 500; }

.new-note-body {
    width: 100%; border: none; background: transparent;
    padding: 8px 20px 14px; color: var(--text-secondary);
    font-family: 'Vazirmatn', sans-serif; font-size: 0.88rem;
    outline: none; resize: none; min-height: 44px;
    direction: rtl; line-height: 1.7;
}
.new-note-body::placeholder { color: var(--text-muted); }

.new-note-actions {
    display: flex; align-items: center;
    padding: 8px 12px; gap: 2px;
    border-top: 1px solid var(--border-subtle);
}
.note-action-btn {
    width: 36px; height: 36px; border: none; background: transparent;
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.note-action-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
.note-action-btn svg { width: 18px; height: 18px; }

.new-note-submit {
    margin-right: auto; padding: 7px 20px; border: none;
    background: linear-gradient(135deg, var(--accent-gold), #d4a20e);
    color: #1a1a2e; border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif; font-size: 0.82rem;
    font-weight: 700; cursor: pointer; transition: var(--transition);
}
.new-note-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(226,183,20,0.3);
}

/* ============================================================
   6. نوار آمار / Stats Bar
   ============================================================ */
.stats-bar {
    display: flex; gap: 12px; margin-bottom: 28px;
    overflow-x: auto; padding-bottom: 4px;
}
.stat-chip {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 12px 18px;
    white-space: nowrap; flex-shrink: 0;
}
.stat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.stat-icon.gold { background: rgba(226,183,20,0.12); color: var(--accent-gold); }
.stat-icon.coral { background: rgba(255,107,107,0.12); color: var(--accent-coral); }
.stat-icon.teal { background: rgba(78,205,196,0.12); color: var(--accent-teal); }
.stat-icon.purple { background: rgba(168,85,247,0.12); color: var(--accent-purple); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); }

/* ============================================================
   7. کارت یادداشت / Note Card
   ============================================================ */
.section-title {
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 2px;
    margin-bottom: 18px; padding-right: 4px;
}
.pinned-section { margin-bottom: 36px; }

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    overflow: hidden;
    max-width: 100%;
}
.notes-grid.list-view {
    grid-template-columns: 1fr;
    max-width: 700px;
}

.note-card {
    background: var(--note-default);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius); padding: 18px;
    cursor: pointer; transition: var(--transition);
    position: relative;
    animation: noteAppear 0.4s ease backwards;
    backdrop-filter: blur(8px);
    min-width: 0;
    overflow: hidden;
}
@keyframes noteAppear {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.note-card:nth-child(1) { animation-delay: 0.05s; }
.note-card:nth-child(2) { animation-delay: 0.1s; }
.note-card:nth-child(3) { animation-delay: 0.15s; }
.note-card:nth-child(4) { animation-delay: 0.2s; }
.note-card:nth-child(5) { animation-delay: 0.25s; }
.note-card:nth-child(6) { animation-delay: 0.3s; }
.note-card:nth-child(7) { animation-delay: 0.35s; }
.note-card:nth-child(8) { animation-delay: 0.4s; }

.note-card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.note-card.color-red { background: var(--note-red); }
.note-card.color-orange { background: var(--note-orange); }
.note-card.color-yellow { background: var(--note-yellow); }
.note-card.color-green { background: var(--note-green); }
.note-card.color-teal { background: var(--note-teal); }
.note-card.color-blue { background: var(--note-blue); }
.note-card.color-purple { background: var(--note-purple); }
.note-card.color-pink { background: var(--note-pink); }

.note-card-header {
    display: flex; align-items: flex-start;
    justify-content: space-between; margin-bottom: 10px;
}
.note-card-title {
    font-size: 0.95rem; font-weight: 700;
    color: var(--text-primary); line-height: 1.5; flex: 1;
}
.note-pin {
    color: var(--accent-gold); opacity: 0;
    transition: var(--transition); flex-shrink: 0; margin-right: 8px;
    cursor: pointer;
}
.note-card:hover .note-pin, .note-card.pinned .note-pin { opacity: 1; }

.note-card-body {
    font-size: 0.82rem; color: var(--text-secondary);
    line-height: 1.8; margin-bottom: 14px;
    display: -webkit-box; -webkit-line-clamp: 5;
    -webkit-box-orient: vertical; overflow: hidden;
    word-wrap: break-word; overflow-wrap: break-word;
}

/* چک‌لیست */
.note-checklist { list-style: none; margin-bottom: 14px; }
.note-checklist li {
    display: flex; align-items: center; gap: 8px;
    padding: 3px 0; font-size: 0.82rem; color: var(--text-secondary);
    cursor: pointer;
}
.note-checklist li.checked { text-decoration: line-through; color: var(--text-muted); }
.note-checklist li.more-items { color: var(--text-muted); font-size: 0.75rem; padding-top: 4px; }

.check-icon {
    width: 16px; height: 16px; border: 1.5px solid var(--text-muted);
    border-radius: 4px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.note-checklist li.checked .check-icon {
    background: var(--accent-teal); border-color: var(--accent-teal);
}

/* برچسب‌ها */
.note-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.note-tag {
    font-size: 0.68rem; font-weight: 500;
    padding: 3px 10px; border-radius: 20px;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
}
.note-tag.tag-blue { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.note-tag.tag-purple { background: rgba(168,85,247,0.15); color: var(--accent-purple); }
.note-tag.tag-gold { background: rgba(226,183,20,0.15); color: var(--accent-gold); }
.note-tag.tag-coral { background: rgba(239,68,68,0.15); color: var(--accent-coral); }
.note-tag.tag-teal { background: rgba(20,184,166,0.15); color: var(--accent-teal); }
.note-tag.tag-orange { background: rgba(249,115,22,0.15); color: var(--accent-orange); }
.note-tag.tag-pink { background: rgba(236,72,153,0.15); color: var(--accent-pink); }
.note-tag.tag-green { background: rgba(34,197,94,0.15); color: var(--accent-lime); }

.note-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}
.note-date { font-size: 0.7rem; color: var(--text-muted); }
.note-card-actions {
    display: flex; gap: 2px; opacity: 0; transition: var(--transition);
}
.note-card:hover .note-card-actions { opacity: 1; }

.card-action-btn {
    width: 30px; height: 30px; border: none; background: transparent;
    color: var(--text-muted); border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.card-action-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-secondary); }
.card-action-btn svg { width: 15px; height: 15px; }

/* ============================================================
   8. مدال ویرایشگر / Editor Modal
   ============================================================ */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    z-index: 200; display: none;
    align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 20px; width: 90%; max-width: 560px;
    max-height: 80vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-card .new-note-title { padding: 24px 24px 8px; font-size: 1.15rem; }
.modal-card .new-note-body { padding: 8px 24px 20px; min-height: 120px; }
.modal-card .new-note-actions { padding: 12px 16px; }

/* نوار ابزار فرمت‌بندی متن / Rich Text Toolbar */
.rich-toolbar {
    display: flex; align-items: center; gap: 2px;
    padding: 6px 16px; border-bottom: 1px solid var(--border-subtle);
    flex-wrap: wrap;
}
.rich-btn {
    width: 32px; height: 32px; border: none; background: transparent;
    color: var(--text-secondary); border-radius: 6px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-family: 'Georgia', serif; transition: var(--transition);
}
.rich-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.rich-separator {
    width: 1px; height: 20px; background: var(--border-subtle); margin: 0 4px;
}
.rich-select {
    background: transparent; border: 1px solid var(--border-subtle);
    color: var(--text-secondary); border-radius: 6px;
    padding: 4px 8px; font-family: 'Vazirmatn', sans-serif;
    font-size: 0.75rem; cursor: pointer; outline: none;
}
.rich-select option { background: var(--bg-secondary); color: var(--text-primary); }
.rich-color-btn {
    position: relative; font-weight: 700; font-size: 0.95rem;
}
.rich-color-btn input[type="color"] {
    position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 4px; border: none; padding: 0;
    cursor: pointer; opacity: 0.8; background: transparent;
}
.rich-color-btn input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.rich-color-btn input[type="color"]::-webkit-color-swatch { border: none; border-radius: 2px; }

/* ویرایشگر contenteditable */
.rich-editor {
    outline: none; white-space: pre-wrap; word-wrap: break-word;
}
.rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted); pointer-events: none;
}
.rich-editor font { font-family: 'Vazirmatn', sans-serif !important; }

/* انتخابگر رنگ در ویرایشگر */
.color-picker-row {
    display: flex; gap: 8px; padding: 12px 24px;
    flex-wrap: wrap; border-top: 1px solid var(--border-subtle);
}
.color-dot {
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    transition: var(--transition);
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: #fff; }

/* چک‌لیست در ویرایشگر */
.editor-checklist { padding: 8px 24px; }
.editor-checklist-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 0;
}
.editor-checklist-item input[type="checkbox"] {
    accent-color: var(--accent-teal);
    width: 16px; height: 16px; cursor: pointer;
}
.editor-checklist-item input[type="text"] {
    flex: 1; background: transparent; border: none;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif; font-size: 0.85rem;
    outline: none; direction: rtl;
}
.editor-checklist-item input[type="text"]::placeholder { color: var(--text-muted); }
.editor-checklist-item.add-item { opacity: 0.6; }

/* برچسب‌ها در ویرایشگر */
.editor-labels {
    padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 8px;
    border-top: 1px solid var(--border-subtle);
}
.editor-label-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-subtle);
    cursor: pointer; font-size: 0.8rem; color: var(--text-secondary);
    transition: var(--transition);
}
.editor-label-item:hover { background: rgba(255,255,255,0.08); }
.editor-label-item.selected {
    background: rgba(226,183,20,0.1);
    border-color: rgba(226,183,20,0.3);
    color: var(--accent-gold);
}
.editor-label-item svg { color: var(--accent-teal); }

/* پخش‌کننده صوتی در کارت یادداشت */
.note-audio-list {
    padding: 8px 14px 4px;
    display: flex; flex-direction: column; gap: 4px;
}
.note-audio-item {
    display: flex; align-items: center; gap: 6px;
    color: var(--accent-teal);
}
.note-audio-item audio {
    flex: 1; min-width: 0; height: 28px;
    border-radius: 20px; outline: none;
    filter: brightness(0.9) saturate(0.8);
}

/* فایل‌های پیوست در ویرایشگر */
.editor-file-list {
    padding: 8px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 4px;
}
.editor-file-list-pending { border-top: none; }
.editor-file-item {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 10px; border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
}
.editor-file-item svg { flex-shrink: 0; color: var(--accent-teal); }
.editor-file-name {
    flex: 1; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; color: var(--text-secondary);
    text-decoration: none;
}
a.editor-file-name:hover { color: var(--accent-gold); text-decoration: underline; }
.editor-file-size { color: var(--text-muted); font-size: 0.75rem; flex-shrink: 0; }
.file-attach-btn { cursor: pointer; }

/* رنگ ویرایشگر مطابق رنگ یادداشت */
.modal-card.color-red { background: linear-gradient(135deg, rgba(220,38,38,0.18), var(--bg-secondary)); }
.modal-card.color-orange { background: linear-gradient(135deg, rgba(249,115,22,0.18), var(--bg-secondary)); }
.modal-card.color-yellow { background: linear-gradient(135deg, rgba(234,179,8,0.18), var(--bg-secondary)); }
.modal-card.color-green { background: linear-gradient(135deg, rgba(34,197,94,0.18), var(--bg-secondary)); }
.modal-card.color-teal { background: linear-gradient(135deg, rgba(20,184,166,0.18), var(--bg-secondary)); }
.modal-card.color-blue { background: linear-gradient(135deg, rgba(59,130,246,0.18), var(--bg-secondary)); }
.modal-card.color-purple { background: linear-gradient(135deg, rgba(168,85,247,0.18), var(--bg-secondary)); }
.modal-card.color-pink { background: linear-gradient(135deg, rgba(236,72,153,0.18), var(--bg-secondary)); }

/* نشانگر فایل پیوست روی کارت یادداشت */
.note-file-indicator {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.72rem; color: var(--text-muted);
    margin-bottom: 10px; padding: 4px 0;
}
.note-file-indicator svg { color: var(--accent-teal); }

/* گرید تامبنیل رسانه در کارت یادداشت */
.note-media-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 6px; margin-bottom: 12px;
}
.note-media-thumb {
    position: relative; aspect-ratio: 1;
    border-radius: 8px; overflow: hidden;
    cursor: pointer; border: 1px solid var(--border-subtle);
}
.note-media-thumb img, .note-media-thumb video {
    width: 100%; height: 100%; object-fit: cover;
}
.note-media-thumb:hover { border-color: rgba(255,255,255,0.2); }
.media-play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.note-media-more {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 1; border-radius: 8px;
    background: rgba(255,255,255,0.06); color: var(--text-muted);
    font-size: 0.8rem; font-weight: 600;
    border: 1px solid var(--border-subtle);
}

/* گرید تامبنیل رسانه در ویرایشگر */
.editor-media-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px; padding: 10px 24px;
}
.editor-media-thumb {
    position: relative; aspect-ratio: 1;
    border-radius: 8px; overflow: hidden;
    border: 1px solid var(--border-subtle);
}
.editor-media-thumb img, .editor-media-thumb video {
    width: 100%; height: 100%; object-fit: cover;
}
.media-thumb-delete {
    position: absolute; top: 4px; right: 4px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.7); border: none;
    color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
}
.editor-media-thumb:hover .media-thumb-delete { opacity: 1; }

/* لایت‌باکس */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(12px);
    z-index: 300; display: flex;
    align-items: center; justify-content: center;
    animation: fadeIn 0.2s ease;
}
.lightbox-content {
    position: relative; max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.lightbox-content img {
    max-width: 90vw; max-height: 80vh;
    object-fit: contain; border-radius: 8px;
}
.lightbox-content video {
    max-width: 90vw; max-height: 80vh;
    border-radius: 8px; outline: none;
}
.lightbox-actions {
    display: flex; align-items: center; gap: 16px;
    background: rgba(255,255,255,0.06); border-radius: 10px;
    padding: 8px 16px;
}
.lightbox-name {
    font-size: 0.82rem; color: var(--text-secondary);
    max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lightbox-download {
    display: flex; align-items: center; gap: 6px;
    color: var(--accent-teal); text-decoration: none;
    font-size: 0.82rem; font-weight: 600;
    padding: 4px 12px; border-radius: 8px;
    transition: var(--transition);
}
.lightbox-download:hover { background: rgba(78,205,196,0.1); }
.lightbox-close {
    position: absolute; top: -40px; right: 0;
    width: 36px; height: 36px; border: none;
    background: rgba(255,255,255,0.08); color: #fff;
    border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.15); }

/* ============================================================
   9. اعلان / Toast
   ============================================================ */
.toast {
    position: fixed; bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px; padding: 12px 24px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--shadow-hover); z-index: 300;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem; color: var(--text-secondary);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { color: var(--accent-teal); }

/* ============================================================
   10. دکمه شناور / FAB
   ============================================================ */
.fab {
    position: fixed; bottom: 32px; left: 32px;
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
    border: none; border-radius: 16px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #1a1a2e;
    box-shadow: 0 8px 32px rgba(226,183,20,0.3);
    transition: var(--transition); z-index: 50;
}
.fab:hover {
    transform: translateY(-3px) rotate(90deg);
    box-shadow: 0 12px 40px rgba(226,183,20,0.4);
}
.fab svg { width: 26px; height: 26px; }

/* حالت خالی */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { width: 80px; height: 80px; color: var(--text-muted); opacity: 0.3; margin-bottom: 20px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   11. اسکرول‌بار / Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ============================================================
   12. واکنش‌گرا / Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar { width: 72px; }
    .sidebar-brand h1, .sidebar-brand span,
    .nav-item span, .nav-badge,
    .nav-section-title, .user-info,
    .theme-toggle span { display: none; }
    .sidebar-brand { text-align: center; padding: 20px 8px; }
    .nav-item { justify-content: center; padding: 12px; }
    .user-profile { justify-content: center; }
    .main-content { margin-right: 72px; }
    .theme-toggle { justify-content: center; padding: 10px; }

    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
        position: fixed; top: 0; right: 0;
        width: 260px; height: 100vh; z-index: 200;
    }
    .sidebar.open {
        display: flex;
    }
    .sidebar.open ~ .sidebar-overlay { display: block; }
    .sidebar-brand h1, .sidebar-brand span,
    .nav-item span, .nav-badge,
    .nav-section-title, .user-info,
    .theme-toggle span { display: revert; }
    .nav-item { justify-content: flex-start; padding: 11px 14px; }
    .theme-toggle { justify-content: flex-start; }
    .main-content { margin-right: 0; }
    .page-content { padding: 20px 16px; }
    .header { padding: 0 16px; }
    .notes-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .stats-bar { gap: 8px; }
    .stat-chip { padding: 10px 14px; }
    .settings-page { padding: 20px 16px; }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-section { padding: 20px; }
    .modal-card { width: 96%; max-width: none; max-height: 90vh; }
    .lightbox-content { max-width: 96vw; }
    .db-fields-grid { grid-template-columns: 1fr; }
    .label-form-fields { flex-direction: column; }
}

@media (max-width: 480px) {
    .page-content { padding: 16px 12px; }
    .header { height: 56px; }
    .notes-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-wrap: wrap; }
    .stat-chip { flex: 1; min-width: 130px; }
    .new-note-container { margin-bottom: 24px; }
    .fab { bottom: 20px; left: 20px; width: 50px; height: 50px; }
    .settings-section { padding: 16px; }
}

/* دکمه منو موبایل */
.mobile-menu-btn {
    display: none;
    width: 40px; height: 40px; border: none;
    background: transparent; color: var(--text-secondary);
    border-radius: 10px; cursor: pointer;
    align-items: center; justify-content: center;
    transition: var(--transition);
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.mobile-menu-btn svg { width: 22px; height: 22px; }

.sidebar-overlay {
    display: none; position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 199;
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
}

/* بکاپ */
.backup-actions { margin-bottom: 16px; }

/* ============================================================
   13. احراز هویت / Auth Pages (Login, Setup)
   ============================================================ */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    position: relative; z-index: 1;
}

.auth-container {
    width: 100%; max-width: 420px;
    display: flex; flex-direction: column; gap: 24px;
}

.auth-brand {
    text-align: center;
}
.auth-brand h1 {
    font-size: 1.8rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-brand span {
    font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 4px;
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-card);
}

.auth-title {
    font-size: 1.3rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px;
}

.auth-error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171; border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 0.85rem; margin-bottom: 16px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
}

.form-input {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif; font-size: 0.88rem;
    outline: none; transition: var(--transition);
    direction: rtl;
}
.form-input:focus {
    border-color: rgba(226,183,20,0.4);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(226,183,20,0.08);
}
.form-input::placeholder { color: var(--text-muted); }

.form-select { cursor: pointer; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); }

.auth-btn {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, var(--accent-gold), #d4a20e);
    border: none; border-radius: var(--radius-sm);
    color: #1a1a2e; font-family: 'Vazirmatn', sans-serif;
    font-size: 0.95rem; font-weight: 700;
    cursor: pointer; transition: var(--transition);
    margin-top: 8px;
}
.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(226,183,20,0.35);
}
.auth-btn:disabled {
    opacity: 0.6; cursor: not-allowed; transform: none;
}

/* ============================================================
   14. صفحه تنظیمات / Settings Page
   ============================================================ */
.settings-page {
    padding: 32px;
    max-width: 1200px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.settings-column { display: flex; flex-direction: column; gap: 24px; }

.settings-header { margin-bottom: 32px; }
.settings-title {
    font-size: 1.6rem; font-weight: 800;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-coral));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.settings-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
}

.section-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: 24px;
}
.section-title svg { width: 20px; height: 20px; color: var(--accent-gold); }

.settings-section .form-group { margin-bottom: 16px; }

.db-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .db-fields-grid { grid-template-columns: 1fr; } }

.section-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }

/* SQLite quick-setup */
.sqlite-quick-setup { margin-bottom: 20px; }

.sqlite-path-box {
    display: flex; align-items: flex-start; gap: 14px;
    background: rgba(78, 205, 196, 0.06);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: var(--radius-sm);
    padding: 16px 18px; margin-bottom: 12px;
}
.sqlite-path-box svg { width: 22px; height: 22px; color: var(--accent-teal); flex-shrink: 0; margin-top: 2px; }
.sqlite-path-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 4px; }
.sqlite-path-value {
    font-family: 'Courier New', monospace; font-size: 0.82rem;
    color: var(--accent-teal); word-break: break-all;
}
.sqlite-hint { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; }

.btn-full { width: 100%; justify-content: center; display: flex; align-items: center; gap: 6px; padding: 12px; }

.settings-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 20px 0;
    color: var(--text-muted); font-size: 0.78rem;
}
.settings-divider::before, .settings-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border-subtle);
}

.btn-group { display: flex; gap: 10px; margin-top: 20px; }

.seed-checkbox {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px; cursor: pointer;
    font-size: 0.82rem; color: var(--text-secondary);
}
.seed-checkbox input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--accent-teal);
    cursor: pointer;
}

.btn {
    padding: 10px 20px; border: none; border-radius: var(--radius-sm);
    font-family: 'Vazirmatn', sans-serif; font-size: 0.88rem;
    font-weight: 600; cursor: pointer; transition: var(--transition);
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), #d4a20e);
    color: #1a1a2e;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(226,183,20,0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-secondary:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.status-message {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.85rem; margin-top: 12px;
}
.status-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}
.status-error {
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #f87171;
}

.text-left {
    direction: ltr !important;
    text-align: left !important;
}

select {
    background-color: #2f3b55; /* رنگ ثابت */
    color: #ffffff; /* رنگ متن */
}

    select option {
        background-color: #2f3b55;
        color: #ffffff;
    }
/* ============================================================
   15. لینک تنظیمات و دکمه خروج / Settings Link & Logout Button
   ============================================================ */
.settings-link {
    text-decoration: none;
    margin-bottom: 8px;
    display: flex;
}

.logout-form { margin-right: auto; }

.logout-btn {
    width: 34px; height: 34px; border: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted); border-radius: 8px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.logout-btn:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}
.logout-btn svg { width: 17px; height: 17px; }

/* ============================================================
   16. دکمه تغییر تم / Theme Toggle Button
   ============================================================ */
.theme-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    cursor: pointer; transition: var(--transition);
    color: var(--text-secondary); font-size: 0.85rem;
    font-weight: 500; border: none; background: transparent;
    width: 100%; margin-bottom: 8px;
    font-family: 'Vazirmatn', sans-serif;
}
.theme-toggle:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.theme-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ============================================================
   17. بازنویسی تم روشن / Light Theme Overrides
   ============================================================ */
[data-theme="light"] body::before,
[data-theme="light"] body::after { display: none; }

[data-theme="light"] .header {
    background: rgba(245,245,245,0.9);
    border-bottom-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .search-input {
    background: rgba(0,0,0,0.04);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .search-input:focus {
    background: rgba(0,0,0,0.06);
    border-color: rgba(201,161,10,0.4);
    box-shadow: 0 0 0 3px rgba(201,161,10,0.1);
}

[data-theme="light"] .nav-item:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .nav-item.active { background: rgba(201,161,10,0.08); }
[data-theme="light"] .view-toggle { background: rgba(0,0,0,0.04); }
[data-theme="light"] .view-toggle button.active { background: rgba(0,0,0,0.08); }

[data-theme="light"] .note-card { backdrop-filter: none; }
[data-theme="light"] .note-card:hover {
    border-color: rgba(0,0,0,0.12);
}

[data-theme="light"] .new-note-submit,
[data-theme="light"] .auth-btn,
[data-theme="light"] .btn-primary,
[data-theme="light"] .fab {
    color: #fff;
}

[data-theme="light"] .user-avatar { color: #fff; }

[data-theme="light"] .theme-toggle:hover { background: rgba(0,0,0,0.05); }

[data-theme="light"] .modal-card.color-red { background: linear-gradient(135deg, rgba(220,38,38,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-orange { background: linear-gradient(135deg, rgba(249,115,22,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-yellow { background: linear-gradient(135deg, rgba(234,179,8,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-green { background: linear-gradient(135deg, rgba(34,197,94,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-teal { background: linear-gradient(135deg, rgba(20,184,166,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-blue { background: linear-gradient(135deg, rgba(59,130,246,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-purple { background: linear-gradient(135deg, rgba(168,85,247,0.1), var(--bg-secondary)); }
[data-theme="light"] .modal-card.color-pink { background: linear-gradient(135deg, rgba(236,72,153,0.1), var(--bg-secondary)); }

[data-theme="light"] select {
    background-color: #f0f0f2;
    color: #1a1a2e;
}
[data-theme="light"] select option {
    background-color: #f0f0f2;
    color: #1a1a2e;
}
[data-theme="light"] .rich-btn { color: #555; }
[data-theme="light"] .rich-btn:hover { background: rgba(0,0,0,0.06); color: #111; }
[data-theme="light"] .rich-select { border-color: #d0d0d5; color: #555; }
[data-theme="light"] .rich-select option { background: #fff; color: #111; }
[data-theme="light"] .rich-editor:empty::before { color: #999; }

/* ============================================================
   18. مدیریت برچسب‌ها / Label Management (Settings)
   ============================================================ */
.label-form { margin-bottom: 24px; }

.label-form-fields {
    display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap;
    margin-bottom: 12px;
}

.label-color-picker {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 6px 0;
}

.label-color-dot {
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    transition: var(--transition); padding: 0;
}
.label-color-dot:hover { transform: scale(1.2); }
.label-color-dot.active {
    border-color: var(--text-primary);
    transform: scale(1.15);
}

.label-list {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 16px;
}

.label-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}
.label-list-item:hover { background: rgba(255,255,255,0.05); }
.label-list-item.editing {
    border-color: rgba(226,183,20,0.3);
    background: rgba(226,183,20,0.04);
}

.label-list-name {
    flex: 1; font-size: 0.88rem;
    font-weight: 500; color: var(--text-primary);
}

.label-list-count {
    font-size: 0.72rem; color: var(--text-muted);
    background: rgba(255,255,255,0.06);
    padding: 2px 8px; border-radius: 20px;
}

.label-list-actions { display: flex; gap: 4px; }

[data-theme="light"] .label-list-item { background: rgba(0,0,0,0.02); }
[data-theme="light"] .label-list-item:hover { background: rgba(0,0,0,0.04); }
[data-theme="light"] .label-list-count { background: rgba(0,0,0,0.06); }
