:root {
    --page-bg: #f5f6fb;
    --panel-bg: #ffffff;
    --border-color: #e2e6f0;
    --text-main: #1d2433;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-strong: #1d4fd8;
}

.filter-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    background: var(--page-bg);
    color: var(--text-main);
    font-family: "Inter", "Segoe UI", "Fira Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.page-shell {
    width: 100%;
    margin: 0 auto;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.glass-card {
    background: var(--panel-bg);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 45px rgba(15, 23, 42, 0.08);
    width: min(420px, 100%);
    padding: 2rem;
}

.auth-card {
    margin: 0 auto;
}

/* Статус скопированных строк */
.line-copied {
    opacity: 0.5;
    color: #999 !important;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.line-copied:hover {
    opacity: 0.6;
}

.form-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.form-control {
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 0.65rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: none;
    background-color: #fff;
}

.btn-primary {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-bg: var(--accent-strong);
    --bs-btn-hover-border-color: var(--accent-strong);
    --bs-btn-focus-shadow-rgb: 37, 99, 235;
    font-weight: 600;
    border-radius: 0.65rem;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

#login-helper {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    color: var(--text-muted);
}

.eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    flex: 1;
    min-height: 0; /* Prevent overflow in flex container */
}

.card-panel {
    background: var(--panel-bg);
    border-radius: 0.9rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.songs-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    overflow: hidden;
}

.songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.panel-title {
    font-size: 1.25rem;
    margin: 0;
}

.songs-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    min-height: 0;
}

.song-item-wrapper {
    position: relative;
}

body.editing-mode .song-item-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.song-drag-handle {
    width: 2rem;
    min-width: 2rem;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.song-drag-icon {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    pointer-events: none;
}

.song-drag-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    pointer-events: none;
}

body:not(.editing-mode) .song-drag-handle {
    display: none;
}

body.editing-mode .song-drag-handle {
    cursor: grab;
}

body.editing-mode .song-drag-handle:active {
    cursor: grabbing;
}

.song-edit-controls {
    display: none;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

body.editing-mode .song-edit-controls {
    display: flex;
}

.song-edit-controls .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
}

.song-item-wrapper.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

.song-item-wrapper.drag-over {
    border-top: 3px solid var(--accent);
    margin-top: 3px;
    transition: all 0.2s ease;
}

.song-item-wrapper.dragging .song-item {
    cursor: grabbing;
    pointer-events: none;
}

body.editing-mode .song-item-wrapper {
    flex-wrap: wrap;
}

body.editing-mode .song-item {
    cursor: default;
    transition: transform 0.2s ease;
    flex: 1;
}

body.editing-mode .song-item:hover {
    transform: translateY(-1px);
}

.song-item {
    display: block;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    background-color: #f9fafc;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.song-item h3 {
    font-size: 1rem;
    margin: 0 0 0.15rem;
}

.song-item p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.song-item .tag {
    margin-top: 0.4rem;
}

.song-item:hover {
    border-color: var(--border-color);
    transform: translateX(2px);
}

.song-item.active {
    border-color: rgba(37, 99, 235, 0.35);
    background-color: #eef2ff;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    background-color: #edf2f7;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-main);
}

.lyrics-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    overflow: hidden;
}

.lyrics-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.lyrics-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.lyrics-actions .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.lyrics-head-meta {
    display: flex;
    flex-direction: column;
}

.btn-add-line,
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-edit-mode {
    background-color: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 0.65rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-add-line:hover,
.btn-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-edit-mode:hover {
    background-color: #f9fafc;
    border-color: rgba(37, 99, 235, 0.4);
}

.lyrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
    min-height: 0;
}

.lyric-line {
    display: flex;
    gap: 0.9rem;
    align-items: stretch;
    padding: 0.35rem 1rem;
    border-radius: 0.7rem;
    border: 1px solid var(--border-color);
    background-color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.lyric-line.dragging {
    opacity: 0.6;
    transform: scale(0.995);
}

.lyric-line.drag-over {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lyric-line[data-highlight="1"] {
    border-color: rgba(245, 158, 11, 0.5);
    background-color: #fff7eb;
}

.line-drag-handle {
    width: 2rem;
    min-width: 2rem;
    border: 1px solid transparent;
    border-radius: 0.6rem;
    background-color: rgba(15, 23, 42, 0.04);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.line-drag-icon {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    pointer-events: none;
}

.line-drag-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: currentColor;
    pointer-events: none;
}

.line-body {
    flex: 1;
}

.line-edit-controls {
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
}

.line-edit-controls .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
}

body:not(.editing-mode) .line-drag-handle,
body:not(.editing-mode) .line-edit-controls {
    display: none;
}

body.editing-mode .lyric-line {
    cursor: default;
}

body.editing-mode .line-drag-handle {
    cursor: grab;
}

body.editing-mode .line-drag-handle:active {
    cursor: grabbing;
}

.line-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.45rem;
}

.line-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.line-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.line-comment {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.line-status {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    min-height: 1rem;
}

.line-status.success {
    color: #10b981;
}

.line-status.error {
    color: #ef4444;
}

.line-badge-mic {
    background-color: #dbeafe;
    color: #1d4ed8;
    border: none;
}

.line-badge-mic-backing {
    background-color: #dcfce7;
    color: #15803d;
    border: none;
}

.line-badge-action,
.line-badge-environment {
    background-color: #f3e8ff;
    color: #6d28d9;
}

.line-badge-animation,
.line-badge-custom {
    background-color: #fef9c3;
    color: #92400e;
}

.lyric-line[data-category="microphone"] {
    border-color: rgba(37, 99, 235, 0.4);
    background-color: #eff6ff;
}

.lyric-line[data-category="microphone_backing"] {
    border-color: rgba(34, 197, 94, 0.4);
    background-color: #f0fdf4;
}

.lyric-line[data-category="action"],
.lyric-line[data-category="environment"] {
    border-color: rgba(109, 40, 217, 0.35);
    background-color: #f8f5ff;
}

.lyric-line[data-category="animation"],
.lyric-line[data-category="custom_animation"] {
    border-color: rgba(217, 119, 6, 0.45);
    background-color: #fffbeb;
}

.preview-box {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background-color: #f9fafc;
}

.preview-command {
    font-family: "Inter", "Fira Code", "Segoe UI", monospace;
    font-size: 0.95rem;
    color: var(--text-main);
    word-break: break-word;
}

.tag-preview {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 0.75rem;
    background-color: #fff;
}

.tag-input-container {
    position: relative;
}

.tag-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    align-items: center;
}

.tag-input-field {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9rem;
    font-family: inherit;
    padding: 0.25rem 0;
    margin: 0;
    flex: 1;
    min-width: 120px;
}

.tag-input-container:focus-within .tag-preview-list {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease;
    position: relative;
    user-select: none;
    margin-right: 0;
}

.tag-input-spacer {
    display: inline-block;
    min-width: 1px;
    height: 1px;
}

.tag-input-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tag-input-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tag-input-row .form-control {
    flex: 1;
}

.tag-color-picker {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tag-color-swatch {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    border: 2px solid transparent;
    padding: 0;
    background-color: transparent;
    cursor: pointer;
    transition: transform 140ms ease, border-color 140ms ease;
}

.tag-color-swatch::after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background-color: currentColor;
}

.tag-color-swatch.active {
    border-color: #1d4ed8;
    transform: scale(1.05);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease;
    position: relative;
}

.tag-chip:hover {
    opacity: 0.85;
}

.tag-chip:hover::after {
    content: '×';
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    line-height: 1;
    color: currentColor;
    opacity: 0.7;
}

.tag-color-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background-color: currentColor;
    display: inline-block;
}

.tag-chip.tag-color-blue {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.tag-chip.tag-color-amber {
    background-color: #fef3c7;
    color: #b45309;
}

.tag-chip.tag-color-emerald {
    background-color: #d1fae5;
    color: #047857;
}

.tag-chip.tag-color-rose {
    background-color: #ffe4e6;
    color: #be123c;
}

.tag-chip.tag-color-violet {
    background-color: #ede9fe;
    color: #5b21b6;
}

.tag-chip.tag-color-slate {
    background-color: #e2e8f0;
    color: #1f2937;
}

.tag-color-swatch.tag-color-blue { color: #2563eb; }
.tag-color-swatch.tag-color-amber { color: #f59e0b; }
.tag-color-swatch.tag-color-emerald { color: #10b981; }
.tag-color-swatch.tag-color-rose { color: #f43f5e; }
.tag-color-swatch.tag-color-violet { color: #8b5cf6; }
.tag-color-swatch.tag-color-slate { color: #475569; }

.tag-color-dot.tag-color-blue { background-color: #2563eb; }
.tag-color-dot.tag-color-amber { background-color: #f59e0b; }
.tag-color-dot.tag-color-emerald { background-color: #10b981; }
.tag-color-dot.tag-color-rose { background-color: #f43f5e; }
.tag-color-dot.tag-color-violet { background-color: #8b5cf6; }
.tag-color-dot.tag-color-slate { background-color: #475569; }

.tag-preview-list .tag-chip {
    border: 1px solid transparent;
}

.search-filter-wrapper {
    position: relative;
    width: 100%;
}

.search-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 0.35rem;
    padding: 0.4rem 0.6rem;
    background: #fff;
    border: 1px solid var(--border-color);
}

.search-field input,
#song-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-main);
    background: transparent;
    font-weight: 500;
    box-shadow: none !important;
    appearance: none;
}

.search-field input::placeholder {
    color: rgba(107, 114, 128, 0.9);
}

.search-icon {
    font-size: 1rem;
    color: var(--accent);
    opacity: 0.8;
}

.search-field .filter-toggle {
    border: none;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 0.35rem;
    padding: 0.35rem 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.search-field .filter-toggle:hover {
    background: #e0e7ff;
}

.clear-filter-inline {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.3rem;
}

.clear-filter-inline:hover {
    text-decoration: underline;
}

.search-field:focus-within {
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.tag-filter-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 10;
}

.tag-filter-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.dropdown-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.lyrics-empty {
    min-height: 280px;
    border: 1px dashed var(--border-color);
    border-radius: 0.85rem;
    background-color: #f9fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    color: var(--text-muted);
}

.lyrics-empty-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    background-color: #eef2ff;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.empty-state {
    padding: 1.5rem;
    border-radius: 0.85rem;
    border: 1px dashed var(--border-color);
    text-align: center;
    background-color: #f9fafc;
}

.btn-edit-mode {
    width: 100%;
    border: 1px dashed var(--border-color);
    border-radius: 0.85rem;
    padding: 0.8rem 1rem;
    font-weight: 600;
    background-color: #fff;
    color: var(--text-main);
    margin-top: 1rem;
}

.btn-edit-mode.active {
    border-color: rgba(37, 99, 235, 0.6);
    color: #2563eb;
    background-color: #eef2ff;
}

@media (max-width: 960px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
}

/* Стили для расширенного редактора */
.advanced-preview-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f8fafc;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.preview-line {
    display: flex;
    align-items: flex-start;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-line:last-child {
    border-bottom: none;
}

.line-number {
    color: #9ca3af;
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 2rem;
    text-align: right;
    margin-right: 1rem;
    opacity: 0.6;
}

.line-content {
    flex: 1;
    color: var(--text-main);
}

.line-content.microphone {
    color: #059669;
    font-weight: 500;
}

.line-content.microphone_backing {
    color: #15803d;
    font-weight: 600;
}

.line-content.action {
    color: #7c3aed;
    font-style: italic;
}

.line-content.environment {
    color: #0891b2;
    font-weight: 500;
}

.line-content.animation {
    color: #dc2626;
    font-family: monospace;
}

.line-content.custom_animation {
    color: #ea580c;
    font-family: monospace;
    background-color: #fef3c7;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.preview-category-btn {
    margin-right: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.preview-category-btn.category-microphone {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.preview-category-btn.category-microphone_backing {
    background-color: #dcfce7;
    color: #15803d;
}

.preview-category-btn.category-action,
.preview-category-btn.category-environment {
    background-color: #f3e8ff;
    color: #6d28d9;
}

.preview-category-btn.category-animation,
.preview-category-btn.category-custom_animation {
    background-color: #fef9c3;
    color: #92400e;
}

.line-content.highlight {
    background-color: #fef3c7;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.preview-section {
    margin-top: 1.5rem;
}

#advanced-editor-text {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.delimiter-preview, .lyric-line.delimiter-line {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: var(--text-muted);
}

.delimiter-preview::before, .lyric-line.delimiter-line::before {
    display: none;
}

.delimiter-preview::after, .lyric-line.delimiter-line::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
    margin-left: 0.75em;
}

.delimiter-preview .delimiter-text:not(:empty), .lyric-line.delimiter-line .delimiter-text:not(:empty) {
    padding: 0 0.75em;
}

.delimiter-text {
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Стили для папок */
.folder-item-wrapper {
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: #fff;
    transition: all 0.3s ease;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    gap: 1rem;
    user-select: none;
    transition: background-color 0.2s ease;
    border-radius: 0.9rem;
}

.folder-header:hover {
    background-color: #f8fafc;
}

.folder-icon {
    position: relative;
    width: 24px;
    height: 24px;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.folder-icon .open-icon {
    display: none;
}

.folder-header.expanded .folder-icon [data-lucide="folder"] {
    display: none;
}

.folder-header.expanded .folder-icon .open-icon {
    display: block;
}

.folder-info {
    flex: 1;
}

.folder-name {
    font-size: 1rem;
    margin: 0;
    font-weight: 600;
}

.folder-meta {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.folder-chevron {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.folder-header.expanded .folder-chevron {
    transform: rotate(180deg);
}

.folder-content {
    display: grid;
    grid-template-rows: 0fr;
    overflow: hidden;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #f9fafc;
}

.folder-content > div {
    min-height: 0;
}

.folder-content.show {
    grid-template-rows: 1fr;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    transition: grid-template-rows 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder-content .song-item-wrapper {
    margin-bottom: 0.5rem;
}

.folder-content .song-item-wrapper:last-child {
    margin-bottom: 0;
}

.folder-content .song-item {
    background-color: #fff;
}

.folder-content .song-item.active {
    background-color: #eef2ff;
}

.lyrics-head, .lyrics-actions {
    overflow: visible !important;
}

.folder-selector-container {
    position: relative !important;
    display: inline-block !important;
}

.folder-selector-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    margin-top: 8px !important;
    width: 240px !important;
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    padding: 0.75rem !important;
    z-index: 999999 !important;
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.folder-selector-dropdown.show {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

@keyframes dropdownSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.folder-selector-dropdown::after {
    content: '';
    position: absolute;
    bottom: 100%;
    right: 20px;
    border: 10px solid transparent;
    border-bottom-color: #fff;
}

.folder-select-btn.active {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.folder-select-btn {
    white-space: nowrap;
}

.folder-selector-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.folder-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin: 0;
}

.folder-option:hover {
    background-color: #f3f4f6;
}

.folder-checkbox {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
}

.folder-option-name {
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lyric-line.delimiter-line {
    padding: 0;
    background: transparent;
    border: none;
    cursor: default;
}

.line-content-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.line-icon {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.line-text {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
}

/* Custom Select with Icons */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 0.65rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    font-weight: 500;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--accent);
}

.custom-select-icon {
    width: 1.1em;
    height: 1.1em;
    color: var(--text-muted);
}

.custom-select-arrow {
    margin-left: auto;
    width: 1.2em;
    height: 1.2em;
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 1056; /* Above Bootstrap modal backdrop */
    max-height: 200px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.custom-select-option:hover {
    background-color: #f3f4f6;
}

/* Стили для профиля пользователя */
.user-profile-card {
    position: relative;
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.user-profile-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-main);
}

.user-profile-btn:hover {
    background-color: #f8fafc;
    border-color: var(--accent);
}

.btn-edit-mode-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-main);
    font-size: 1.1rem;
}

.btn-edit-mode-icon:hover {
    background-color: #f8fafc;
    border-color: var(--accent);
}

.btn-edit-mode-icon.active {
    background-color: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-edit-mode-icon.active:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

.user-profile-btn .profile-chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.user-profile-btn.active .profile-chevron {
    transform: rotate(180deg);
}

.user-profile-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 -15px 35px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 1000;
}

.user-profile-dropdown.show {
    display: flex;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.15s ease;
    font-weight: 500;
}

.profile-menu-item:hover {
    background-color: #f3f4f6;
    color: var(--text-main);
}

.profile-menu-item-danger {
    color: #dc2626;
}

.profile-menu-item-danger:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* Стили для кнопок редактирования папок */
.folder-edit-controls {
    display: none;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

body.editing-mode .folder-edit-controls {
    display: flex;
}

/* Стили для активного режима редактирования */
.btn-edit-mode.active {
    background-color: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-edit-mode.active:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Стили для плашки режима просмотра администратора */
.admin-view-notice {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.admin-view-notice-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-view-notice-text {
    color: #78350f;
    font-size: 0.95rem;
    font-weight: 500;
}

.admin-view-notice-text strong {
    color: #451a03;
    font-weight: 700;
}

.admin-view-notice-form {
    margin: 0;
}

.btn-admin-return {
    background: #fff;
    color: #92400e;
    border: 2px solid #fbbf24;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-admin-return:hover {
    background: #fffbeb;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.2);
}
