:root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-hover: #f0f1f3;
    --bg-active: #e8ebed;
    --text: #1a1a2e;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f0f1f3;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.08);
    --primary-light-hover: rgba(99, 102, 241, 0.15);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-light: rgba(239, 68, 68, 0.08);
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --sidebar-width: 220px;
    --notes-panel-width: 280px;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 12px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #1e1e2e;
    --bg-secondary: #181825;
    --bg-hover: #252536;
    --bg-active: #2a2a3c;
    --text: #cdd6f4;
    --text-secondary: #a6adc8;
    --text-tertiary: #6c7086;
    --border: #313244;
    --border-light: #252536;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: rgba(129, 140, 248, 0.1);
    --primary-light-hover: rgba(129, 140, 248, 0.18);
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-light: rgba(248, 113, 113, 0.1);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app {
    display: flex;
    height: 100vh;
}

#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
}

.logo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.3px;
}

.logo-icon {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.header-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text);
}

#theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    color: var(--text-secondary);
}

#theme-toggle:hover {
    background: var(--primary-light);
    color: var(--primary);
}

#logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    color: var(--text-secondary);
}

#logout-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.sidebar-actions {
    padding: 4px 10px 8px;
}

.btn-block {
    width: 100%;
}

.btn {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
    font-weight: 500;
}

.btn:hover {
    background: var(--bg-hover);
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-sm);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-danger {
    color: var(--danger);
    border-color: transparent;
    background: var(--danger-light);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-secondary);
    border-color: var(--border);
    font-weight: 500;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border);
}

.folders-section {
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-light);
    flex: 8;
    overflow-y: auto;
    min-height: 0;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 13px;
    position: relative;
    gap: 5px;
    color: var(--text-secondary);
}

.folder-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.folder-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.folder-item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item-count {
    font-size: 11px;
    opacity: 0.5;
    min-width: 16px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.folder-item.active .folder-item-count {
    opacity: 0.7;
}

.folder-item-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
    font-size: 16px;
    line-height: 1;
    color: var(--text-tertiary);
    border-radius: 3px;
    opacity: 0;
    transition: opacity var(--transition);
}

.folder-item:hover .folder-item-menu {
    opacity: 1;
}

.folder-item.active .folder-item-menu {
    color: var(--primary);
    opacity: 1;
}

.folder-item-menu:hover {
    background: var(--bg-active);
}

.folder-children {
    padding-left: 14px;
}

.folder-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--text-tertiary);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.folder-toggle.expanded {
    transform: rotate(90deg);
}

.folder-toggle-placeholder {
    width: 14px;
    flex-shrink: 0;
}

.tags-section {
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    border-bottom: 1px solid var(--border-light);
    flex: 2;
    overflow-y: auto;
    min-height: 0;
    align-content: flex-start;
}

.tag-chip {
    padding: 2px 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.tag-chip:hover,
.tag-chip.active {
    background: var(--primary-light);
    color: var(--primary);
    border-color: transparent;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.footer-actions {
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: center;
}

.footer-actions .btn-icon {
    padding: 5px;
    opacity: 0.6;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
}

.footer-actions .btn-icon:hover {
    opacity: 1;
    background: var(--bg-hover);
}

#notes-panel {
    width: var(--notes-panel-width);
    min-width: var(--notes-panel-width);
    background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#notes-panel.collapsed {
    width: 40px;
    min-width: 40px;
}

#notes-panel.collapsed .notes-panel-header,
#notes-panel.collapsed .notes-list,
#notes-panel.collapsed .notes-panel-footer {
    display: none;
}

#notes-panel.collapsed .notes-panel-collapsed-bar {
    display: flex;
}

.notes-panel-collapsed-bar {
    display: none;
    flex-direction: column;
    align-items: center;
    padding-top: 12px;
    gap: 8px;
    width: 40px;
}

.notes-panel-collapsed-bar button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: all var(--transition);
}

.notes-panel-collapsed-bar button:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notes-panel-header {
    padding: 12px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.notes-panel-top-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.notes-panel-top-row .search-box {
    flex: 1;
    padding: 0;
}

.notes-panel-header .search-box {
    padding: 0;
}

.notes-panel-header .search-box input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all var(--transition);
}

.notes-panel-header .search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg);
}

.notes-panel-header .search-box input::placeholder {
    color: var(--text-tertiary);
}

.notes-panel-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.note-count {
    opacity: 0.8;
    font-variant-numeric: tabular-nums;
}

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 6px;
}

.note-item {
    padding: 10px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 1px;
    border-left: 3px solid transparent;
}

.note-item:hover {
    background: var(--bg-hover);
}

.note-item.active {
    background: var(--primary-light);
    border-left-color: var(--primary);
}

.note-item.active .note-item-title {
    color: var(--primary);
}

.note-item.active .note-item-snippet,
.note-item.active .note-item-meta {
    color: var(--text-tertiary);
}

.note-item-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.note-item-snippet {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.note-item-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 3px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.note-item.active .note-item-tags .tag-chip {
    background: var(--primary-light-hover);
    color: var(--primary);
    border-color: transparent;
}

#editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h2 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 600;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.6;
}

.empty-state .hint {
    font-size: 13px;
    margin-top: 4px;
    opacity: 0.6;
}

.empty-shortcuts {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-family: inherit;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 1px 0 var(--border);
    color: var(--text-secondary);
}

.note-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-header {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

.title-input {
    flex: 1;
    font-size: 22px;
    font-weight: 700;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    letter-spacing: -0.3px;
}

.title-input::placeholder {
    color: var(--text-tertiary);
}

.title-display {
    flex: 1;
    cursor: text;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.title-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.3;
    word-break: break-word;
}

.title-text:empty::before {
    content: '点击输入标题...';
    color: var(--text-tertiary);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.toolbar-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.4;
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.toolbar-btn b, .toolbar-btn i, .toolbar-btn s {
    pointer-events: none;
}

.toolbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 4px;
    flex-shrink: 0;
}

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

.tags-input-container {
    padding: 8px 24px;
    border-bottom: 1px solid var(--border-light);
}

.tags-input-container input {
    width: 100%;
    padding: 4px 0;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text);
    font-size: 13px;
}

.tags-input-container input::placeholder {
    color: var(--text-tertiary);
}

.editor-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.content-textarea {
    flex: 1;
    padding: 24px;
    border: none;
    outline: none;
    background: var(--bg);
    color: var(--text);
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    tab-size: 4;
}

.content-textarea::placeholder {
    color: var(--text-tertiary);
}

.content-preview {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    line-height: 1.8;
    font-size: 15px;
}

.content-preview h1, .content-preview h2, .content-preview h3,
.content-preview h4, .content-preview h5, .content-preview h6 {
    margin-top: 24px;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text);
}

.content-preview h1 { font-size: 28px; border-bottom: 2px solid var(--border-light); padding-bottom: 8px; }
.content-preview h2 { font-size: 22px; border-bottom: 1px solid var(--border-light); padding-bottom: 6px; }
.content-preview h3 { font-size: 18px; }

.content-preview p {
    margin-bottom: 12px;
}

.content-preview code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    font-family: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    color: var(--primary);
}

.content-preview pre {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.content-preview pre code {
    background: none;
    padding: 0;
    color: var(--text);
}

.content-preview blockquote {
    border-left: 3px solid var(--primary);
    padding: 8px 16px;
    margin-bottom: 12px;
    background: var(--primary-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

.content-preview ul, .content-preview ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.content-preview li {
    margin-bottom: 4px;
}

.content-preview .task-item {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-preview .task-item input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.content-preview .task-done {
    text-decoration: line-through;
    opacity: 0.6;
}

.content-preview del {
    opacity: 0.7;
}

.content-preview a {
    color: var(--primary);
    text-decoration: none;
}

.content-preview a:hover {
    text-decoration: underline;
}

.content-preview .wikilink {
    background: var(--primary-light);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--primary);
    font-size: 13px;
}

.content-preview img {
    max-width: 100%;
    border-radius: var(--radius);
}

.content-preview hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.content-preview table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 12px;
}

.content-preview th, .content-preview td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.content-preview th {
    background: var(--bg-secondary);
    font-weight: 600;
}

.editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
    color: var(--text-tertiary);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.word-count {
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.save-status {
    color: var(--primary);
    font-weight: 500;
}

.save-status.saved {
    color: var(--success);
}

.save-status.error {
    color: var(--danger);
}

.hidden {
    display: none !important;
}

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

[data-theme="dark"] .dialog-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.dialog {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    min-width: 340px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.dialog h3 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}

.dialog p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.shortcuts-dialog {
    min-width: 380px;
}

.shortcuts-list {
    margin: 12px 0;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.shortcut-row:last-child {
    border-bottom: none;
}

.shortcut-row span {
    color: var(--text-secondary);
    font-size: 13px;
}

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-secondary);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 48px 36px;
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid var(--border-light);
}

.login-logo {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), #a78bfa);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.login-field {
    margin-bottom: 14px;
}

.login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: all var(--transition);
}

.login-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.login-field input::placeholder {
    color: var(--text-tertiary);
}

.login-error {
    color: var(--danger);
    font-size: 13px;
    margin-bottom: 12px;
    text-align: center;
    background: var(--danger-light);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

.login-btn {
    width: 100%;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: var(--radius);
}

.import-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.import-tab {
    padding: 8px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-tertiary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    font-weight: 500;
}

.import-tab:hover {
    color: var(--text);
}

.import-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.import-dialog-content {
    min-width: 420px;
}

.dialog-label {
    display: block;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.import-panel {
    min-height: 80px;
}

.dialog-field {
    margin: 14px 0;
}

.dialog-field input,
.dialog-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all var(--transition);
}

.dialog-field input:focus,
.dialog-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.move-select {
    appearance: auto;
    background-color: var(--bg);
    color: var(--text);
}

select option {
    background: var(--bg);
    color: var(--text);
}

.file-input {
    width: 100%;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text);
}

.file-input::file-selector-button {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    margin-right: 10px;
    transition: all var(--transition);
    font-weight: 500;
}

.file-input::file-selector-button:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.import-result {
    margin-top: 12px;
    padding: 10px 14px;
    background: var(--success-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.folder-dropdown {
    position: absolute;
    right: 4px;
    top: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    z-index: 100;
    min-width: 140px;
    padding: 4px;
}

.folder-dropdown-item {
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.folder-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.folder-dropdown-danger:hover {
    background: var(--danger-light);
    color: var(--danger);
}

[data-theme="light"] .icon-sun {
    display: none;
}

[data-theme="dark"] .icon-moon {
    display: none;
}

[data-theme="light"] .icon-moon {
    display: block;
}

[data-theme="dark"] .icon-sun {
    display: block;
}

.dialog-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 10px;
    line-height: 1.5;
}

#folder-delete-dialog .dialog-actions {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

#folder-delete-dialog .btn {
    width: 100%;
    text-align: center;
}
