:root {
    /* פלטת Material You בהירה ופסטלית */
    --bg-base: #edf2fa;
    --bg-surface: #ffffff;
    --bg-elevated: #f0f4f9;
    --bg-sidebar: #e9eef6;
    --bg-sidebar-hover: #dfe7f2;
    --bg-sidebar-active: #d3e3fd;

    --border: #d8e2ee;
    --border-subtle: #e2eaf4;
    --border-strong: #c2d1e5;

    --brand: #0b57d0;
    --brand-hover: #0842a0;
    --brand-light: #d3e3fd;
    --brand-text: #041e49;

    --text-primary: #1f1f1f;
    --text-secondary: #444746;
    --text-muted: #727775;

    --danger: #ba1a1a;
    --danger-light: #ffdad6;
    --danger-text: #410002;

    /* תגיות פסטל Material You */
    --tag-blue-bg: #d3e3fd;
    --tag-blue-text: #041e49;
    --tag-green-bg: #c4eed0;
    --tag-green-text: #072711;
    --tag-yellow-bg: #feefc3;
    --tag-yellow-text: #5f4200;
    --tag-peach-bg: #fad2cf;
    --tag-peach-text: #5c1411;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(11, 87, 208, 0.08);
}

* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-base);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========================================================= */
/* סרגלים עליונים ותחתונים נעולים (לא זזים ולא מתכווצים)     */
/* ========================================================= */
.header {
    background-color: var(--bg-sidebar);
    color: var(--text-primary);
    height: 50px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    position: relative;
    z-index: 100;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand-logo-badge {
    width: 32px;
    height: 32px;
    background: var(--brand);
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-title { 
    font-size: 1rem; 
    font-weight: 700; 
    letter-spacing: 0.2px; 
    color: var(--text-primary);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-about-link {
    cursor: pointer;
    transition: all 0.15s ease;
}

/* פרופיל Google / Drive בסרגל העליון */
.header-auth-slot {
    display: flex;
    align-items: center;
    max-width: min(360px, 46vw);
}
.auth-google-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}
.auth-google-btn:hover {
    border-color: #93c5fd;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.auth-google-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.auth-profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 6px 3px 3px;
    max-width: 100%;
}
.auth-profile-chip.auth-profile-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    padding: 6px 10px;
    gap: 6px;
}
.auth-warning-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
}
.auth-chip-text {
    font-size: 0.74rem;
    font-weight: 700;
    color: #92400e;
}
.auth-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}
.auth-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    color: var(--brand-text);
    font-weight: 800;
    font-size: 0.85rem;
}
.auth-profile-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.auth-profile-name {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.auth-sync-status {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-muted);
}
.auth-sync-status.is-synced { color: #15803d; }
.auth-sync-status.is-syncing { color: #1d4ed8; }
.auth-sync-btn:disabled { opacity: 0.55; cursor: wait; }

@media (max-width: 860px) {
    .auth-google-btn span { display: none; }
    .auth-google-btn { padding: 7px; border-radius: 50%; }
    .auth-profile-meta { display: none; }
    .auth-login-open-btn { padding: 6px 10px; font-size: 0.74rem; }
}

.share-scope-box {
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.share-scope-title {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text-primary);
}
.share-scope-option {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    cursor: pointer;
}
.share-scope-option small {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}
.share-scope-option.compact {
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
}
.ingest-share-scope {
    flex-direction: row;
    align-items: center;
    margin-top: 0;
    padding: 4px 8px;
    gap: 10px;
}
.admin-moderation-slot {
    display: inline-flex;
    align-items: center;
}
.admin-mod-btn {
    position: relative;
    border: 1px solid #f0c36d;
    background: #fff8eb;
    color: #8a5a00;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.admin-mod-btn:hover { background: #fff1d6; }
.admin-mod-badge {
    background: #dc2626;
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.admin-moderation-card {
    width: min(860px, 94vw);
    max-height: 88vh;
}
.admin-moderation-list {
    max-height: 62vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-mod-section h4 {
    margin: 0 0 8px;
    font-size: 0.92rem;
}
.admin-mod-count { color: var(--text-muted); font-weight: 600; }
.admin-mod-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.admin-mod-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.admin-mod-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}
.admin-mod-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.admin-mod-fields label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.admin-mod-fields input,
.admin-mod-fields textarea {
    font-weight: 500;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.admin-mod-fields label:has(textarea) {
    grid-column: 1 / -1;
}
.admin-mod-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.admin-mod-json {
    grid-column: 1 / -1;
    max-height: 160px;
    overflow: auto;
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.auth-guest-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.auth-guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 2px;
    opacity: 0.92;
}
.auth-jit-hint {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: #f0f7ff;
    border: 1px solid #d6e6fb;
    border-radius: 10px;
    color: #1e3a5f;
    font-size: 0.82rem;
    line-height: 1.45;
    font-weight: 600;
}
.auth-login-open-btn {
    border: none;
    background: #1558d6;
    color: #fff;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.auth-login-open-btn:hover { background: #0b57d0; }
.auth-guest-hint {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-muted);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
}
.auth-profile-chip { position: relative; cursor: pointer; }
.auth-sync-status.is-offline { color: #b45309; }
.auth-user-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 1200;
}
.auth-user-menu.open { display: flex; flex-direction: column; gap: 4px; }
.auth-menu-section { padding: 8px 10px 10px; border-bottom: 1px solid #eef2f7; margin-bottom: 4px; }
.auth-menu-email { font-size: 0.72rem; color: var(--text-muted); direction: ltr; text-align: right; }
.auth-menu-status { font-size: 0.74rem; font-weight: 700; margin-top: 4px; }
.auth-menu-item {
    border: none;
    background: transparent;
    text-align: right;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
}
.auth-menu-item:hover { background: #f1f5f9; }
.auth-menu-danger { color: #b91c1c; }

.auth-modal-card { width: 440px; max-width: 94vw; }
.auth-modal-body { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.auth-google-full-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    border: 1px solid #dadce0;
    background: #fff;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1f2937;
    cursor: pointer;
}
.auth-google-full-btn:hover { background: #f8fafc; border-color: #93c5fd; }
.auth-or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.auth-or-divider::before,
.auth-or-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}
.auth-tab {
    border: none;
    background: transparent;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
}
.auth-tab.active {
    background: #fff;
    color: #1558d6;
    box-shadow: var(--shadow-sm);
}
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; font-weight: 700; color: var(--text-primary); }
.auth-field input {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-weight: 500;
}
.auth-field input:focus {
    outline: none;
    border-color: #1558d6;
    box-shadow: 0 0 0 3px rgba(21, 88, 214, 0.12);
}
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
}
.auth-form-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}
.auth-submit-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    border-radius: 10px;
    background: #1558d6;
    font-weight: 700;
}
.auth-guest-link {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 2px;
}

.nav-bar {
    background-color: #1e293b;
    height: 44px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0; /* קריטי: לא יזוז ולא יתכווץ לעולם */
}

.nav-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    height: 100%;
    padding: 0 16px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    border-bottom: 3px solid transparent;
    flex-shrink: 0;
}
.nav-tab:hover { color: #f8fafc; background: rgba(255, 255, 255, 0.04); }
.nav-tab.active {
    color: #ffffff;
    border-bottom-color: #6366f1;
    background: rgba(99, 102, 241, 0.14);
}

.nav-divider { 
    width: 1px; 
    height: 16px; 
    background: rgba(255, 255, 255, 0.12); 
    margin: 0 4px; 
    flex-shrink: 0; 
}

.nav-tab.studio-tab.active {
    border-bottom-color: #818cf8;
    color: #ffffff;
    background: rgba(129, 140, 248, 0.18);
}

.footer-status-bar {
    background-color: #0f172a;
    color: #94a3b8;
    height: 30px;
    padding: 0 24px;
    font-size: 0.76rem;
    font-weight: 500;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    flex-shrink: 0; /* קריטי: לא יזוז לעולם */
}

/* ========================================================= */
/* מסכים ראשיים (תופסים בדיוק את שאר הגובה של החלון)        */
/* ========================================================= */
.tab-screen {
    display: none;
    flex: 1;
    min-height: 0; /* מאפשר גלילה פנימית נקייה ללא דחיפת התפריטים */
    flex-direction: column;
    overflow: hidden;
}
.tab-screen.active { 
    display: flex; 
}

.action-strip {
    background: var(--bg-surface);
    height: 48px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    gap: 12px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    overflow: hidden;
    width: 320px;
    height: 36px;
    padding: 0 6px;
    background: #fff;
    box-sizing: border-box;
}
.search-box:focus-within { border-color: var(--brand); }
.search-input {
    border: none;
    background: transparent;
    padding: 0 12px;
    height: 100%;
    min-width: 0;
    font-size: 0.86rem;
    flex-grow: 1;
    direction: rtl;
    outline: none;
    color: var(--text-primary);
}
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration,
.search-input::-ms-clear,
.search-input::-ms-reveal {
    -webkit-appearance: none;
    appearance: none;
    display: none;
    width: 0;
    height: 0;
}
.artists-screen .search-box:focus-within,
.artists-screen .search-input:focus,
.artists-screen .search-input:focus-visible,
.artists-screen .search-clear:focus,
.artists-screen .search-clear:focus-visible {
    outline: none;
}
.search-btn,
.search-clear {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    padding: 0;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.search-btn:hover,
.search-clear:hover { background: #e2e8f0; color: var(--text-primary); }
.online-search-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 36px 16px;
    grid-column: 1 / -1;
}
.empty-state-card {
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 16px;
}
.search-history-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 20px 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.search-history-row[hidden] { display: none !important; }
.search-history-label {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}
.search-history-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}
.search-history-chip {
    border: 1px solid #dbe3ee;
    background: #f8fafc;
    color: var(--text-primary);
    border-radius: 999px;
    min-height: 28px;
    padding: 2px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.search-history-chip:hover {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
}
#app-toast-host {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(420px, calc(100vw - 28px));
    pointer-events: none;
}
.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    background: var(--bg-surface, rgba(255, 255, 255, 0.97));
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: pre-line;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.32s ease, transform 0.32s ease;
    backdrop-filter: blur(10px);
}
.app-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.app-toast.is-leaving {
    opacity: 0;
    transform: translateY(-8px);
}
.app-toast-icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
}
.app-toast-text { min-width: 0; flex: 1; }
.app-toast.is-success {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}
.app-toast.is-success .app-toast-icon { color: #16a34a; }
.app-toast.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}
.app-toast.is-error .app-toast-icon { color: #dc2626; }
.app-toast.is-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}
.app-toast.is-info .app-toast-icon { color: #2563eb; }

.btn-primary {
    background-color: var(--brand);
    color: #ffffff;
    border: 1px solid transparent;
    padding: 6px 14px;
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s;
}
.btn-primary:hover { background-color: var(--brand-hover); }
.icon-edit-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0 !important;
    justify-content: center;
    flex-shrink: 0;
}
.icon-edit-btn .svg-icon { width: 15px; height: 15px; }

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    padding: 6px 13px;
    min-height: 34px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.btn-secondary:hover { background-color: var(--bg-elevated); color: var(--text-primary); }

.btn-danger {
    background-color: var(--danger-light);
    color: var(--danger-text);
    border: 1px solid #fecaca;
    padding: 6px 13px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.btn-danger:hover { background-color: #fee2e2; border-color: #fca5a5; }

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    min-height: 0;
}
.panel-header {
    background: #fafafa;
    padding: 9px 14px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 0;
}

.song-audio-bar {
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.song-audio-bar[hidden] { display: none; }
.song-audio-main {
    display: flex;
    align-items: center;
    gap: 10px;
}
.song-audio-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.song-audio-name {
    font-weight: 700;
    font-size: 0.86rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-audio-sub,
.song-audio-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.song-audio-play {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 17px;
    background: var(--brand);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
}
.song-audio-track {
    height: 4px;
    border-radius: 2px;
    background: #d7dee8;
    cursor: pointer;
    direction: ltr;
}
.song-audio-fill {
    height: 100%;
    width: 0;
    background: var(--brand);
    border-radius: 2px;
}
.song-audio-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.song-audio-chip {
    border: 1px solid var(--border);
    background: transparent;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
}
.song-audio-chip.active {
    background: var(--brand-light);
    border-color: var(--brand);
}
.song-audio-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.song-audio-note {
    display: inline-flex;
    color: var(--brand);
    flex-shrink: 0;
}
.studio-player-bar {
    border: 1px solid var(--border);
    border-radius: 8px;
}
.studio-player-bar audio { display: none; }
.audio-icon-btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0 !important;
    justify-content: center;
    flex-shrink: 0;
}
.audio-icon-btn .svg-icon { width: 14px; height: 14px; }
.take-final-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.take-final-badge .svg-icon { width: 11px; height: 11px; }
.studio-player-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
#studio-playback-speed { cursor: pointer; }
#studio-audio-sources:empty { display: none; }

.modern-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    font-size: 0.84rem;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    color: var(--text-primary);
}
.modern-select.mini { padding: 3px 6px; font-size: 0.76rem; }

/* ========================================================= */
/* Dashboard                                                 */
/* ========================================================= */
.dashboard-container {
    padding: 24px 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-cards-row {
    display: grid;
    grid-template-columns: 1.3fr 1.7fr 1fr;
    gap: 16px;
    flex-shrink: 0;
}

.hub-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}
.hub-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hub-card-action {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    border: none;
}
.hub-card-action:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
}
.hub-card-action h3 { margin: 0 0 6px 0; font-size: 1.15rem; color: #ffffff; }
.hub-card-action p { margin: 0; font-size: 0.85rem; color: #e0e7ff; }

.hub-card-continue {
    background: #ffffff;
    border-right: 4px solid var(--brand);
}
.hub-card-continue h3 { margin: 0 0 4px 0; font-size: 1.05rem; color: var(--text-primary); }
.hub-card-continue p { margin: 0 0 8px 0; font-size: 0.82rem; color: var(--text-muted); }
.hub-card-continue .preview-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-search { background: #ffffff; }
.hub-card-search h3 { margin: 0 0 4px 0; font-size: 1.05rem; color: var(--text-primary); }
.hub-card-search p { margin: 0; font-size: 0.82rem; color: var(--text-muted); }

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-title-row h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 700;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.project-grid-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 145px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-sm);
}
.project-grid-card:hover {
    border-color: #a5b4fc;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.project-grid-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.project-grid-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-grid-snippet {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.project-grid-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
    margin-top: 6px;
}

/* ========================================================= */
/* סטודיו כתיבה                                              */
/* ========================================================= */
.studio-layout, .studio-workspace-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.6fr) minmax(168px, 0.72fr) minmax(190px, 0.78fr) !important;
    gap: 12px !important;
    padding: 12px 18px !important;
    flex-grow: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}
.studio-editor-box,
.studio-audio-column,
.studio-layout > .panel {
    min-width: 0;
}
.dash-kind-filter { display: flex; gap: 4px; }
.dash-kind-filter button {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.78rem;
    cursor: pointer;
}
.dash-kind-filter button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.song-link-chip {
    border: none;
    background: var(--brand-light, #e0e7ff);
    color: var(--brand);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
}
.compose-player { margin: 8px 18px 0; }
.compose-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(220px, 0.85fr);
    gap: 12px;
    padding: 12px 18px;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}
.compose-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.compose-pane-head, .compose-link-row, .compose-style-rename, .compose-take-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.compose-link-row { flex-wrap: nowrap; min-width: 0; }
.compose-link-row #compose-link-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
}
.compose-link-actions { display: flex; flex-wrap: nowrap; gap: 6px; flex-shrink: 0; }
.compose-link-actions .btn-secondary {
    padding: 4px 8px;
    min-height: 28px;
    font-size: 0.75rem;
    white-space: nowrap;
}
.compose-pane-head input, .compose-style-rename input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    outline: none;
}
.compose-style-rename { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.compose-style-rename input { font-weight: 600; }
#compose-lyrics {
    flex: 1;
    min-height: 0;
    border: none;
    resize: none;
    padding: 12px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    line-height: 1.6;
}
#compose-lyrics[readonly] { opacity: 0.85; }
.compose-styles { display: flex; gap: 6px; padding: 10px 12px 0; }
.compose-style-tab {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px 8px 0 0;
    padding: 6px 10px;
    cursor: pointer;
}
.compose-style-tab.active { font-weight: 700; border-bottom-color: var(--bg-surface); background: var(--bg-surface); }
.compose-take-list, .compose-split { flex: 1; min-height: 0; overflow: auto; }
.compose-take-row, .compose-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    text-align: start;
}
.compose-link-item { cursor: pointer; }
.compose-link-item:hover { background: var(--bg-hover, #f8fafc); }
.compose-take-name { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.compose-take-time { color: var(--text-muted); font-size: 0.75rem; }
.compose-take-rename { width: 150px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px; font: inherit; background: var(--bg-surface); color: var(--text-primary); }
.compose-take-actions-inline, .compose-asset-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.compose-split { display: flex; flex-direction: column; }
.compose-split > div { flex: 1; min-height: 0; padding: 12px; overflow: auto; }
.compose-split > div + div { border-top: 1px solid var(--border); }
.compose-asset-title { font-weight: 700; margin-bottom: 8px; }
.compose-asset-name { margin-bottom: 8px; color: var(--text-muted); }
.compose-empty { color: var(--text-muted); padding: 16px 12px; }
@media (max-width: 980px) {
    .compose-layout { grid-template-columns: 1fr; overflow: auto; }
    .compose-pane { min-height: 280px; }
}
#studio-title { min-width: 0; }
#studio-master-player-bar { flex-wrap: wrap; }
@media (max-width: 980px) {
    .studio-layout, .studio-workspace-layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        overflow: auto !important;
    }
    .studio-layout > .panel {
        grid-column: 1 / -1;
        min-height: 240px;
    }
}

.status-badge {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 12px;
    font-weight: 600;
}
.status-draft { background: #fef3c7; color: #92400e; }
.status-wip { background: #e0e7ff; color: #3730a3; }
.status-done { background: #dcfce7; color: #166534; }

.studio-editor-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.studio-meta-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.studio-meta-bar input {
    font-size: 1.15rem;
    font-weight: bold;
    border: none;
    outline: none;
    flex-grow: 1;
    direction: rtl;
    background: transparent;
    min-width: 0;
    color: var(--text-primary);
}
.studio-meta-bar input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}
.studio-meta-bar .status-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    cursor: pointer;
    flex-shrink: 0;
}
.tr-meta-bar {
    margin: 0;
    min-width: 0;
}
.translate-top {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(140px, 0.36fr);
    gap: 12px;
    padding: 10px 16px 0;
    direction: rtl;
    flex-shrink: 0;
}
.tr-title-player-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    min-width: 0;
    direction: rtl;
    align-items: stretch;
}
.tr-top-rhyme-spacer { min-width: 0; }
.tr-player-bar {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 0;
    padding: 6px 10px;
    gap: 6px;
    box-shadow: var(--shadow-sm);
}
.tr-player-bar .song-audio-files { display: none; }
.tr-player-bar .song-audio-name { font-size: 0.82rem; }
.tr-player-bar .song-audio-sub,
.tr-player-bar .song-audio-time { font-size: 0.72rem; }
.tr-foot-source-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}
#tr-source-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: min(100%, 340px);
}
#tr-source-audio-btn[hidden] { display: none !important; }
#tr-source-audio-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.tr-foot-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    padding: 3px 5px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-surface);
    direction: rtl;
    overflow-x: auto;
}
.tr-foot-toolbar > * { flex-shrink: 0; }
.tr-tool-pill {
    border-radius: 999px !important;
    padding: 4px 8px !important;
    min-height: 32px;
    white-space: nowrap;
}
.tr-tool-save {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: none;
    flex-shrink: 0;
}
.tr-tool-save:hover {
    filter: brightness(1.05);
    background: var(--brand);
    color: #fff;
}
.tr-tool-save .svg-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
.tr-pop-wrap {
    position: relative;
    display: inline-flex;
}
.tr-floating-pop {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tr-floating-pop[hidden] { display: none !important; }
.tr-print-pop { min-width: 200px; padding: 6px; }
.tr-pop-action {
    border: none;
    background: transparent;
    text-align: right;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
}
.tr-pop-action:hover { background: var(--bg-elevated); }
html[dir="ltr"] .tr-floating-pop {
    right: auto;
    left: 0;
}
html[dir="ltr"] .tr-pop-action { text-align: left; }
.compose-pane > .compose-meta-bar {
    margin: 10px 12px 8px;
}

.studio-audio-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.audio-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    transition: all 0.15s;
}
.audio-btn:hover { background: #e2e8f0; color: var(--text-primary); }
.audio-btn.mini { padding: 4px 8px; font-size: 0.76rem; }
.audio-btn.recording {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
    animation: pulse 1.2s infinite;
}
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.6; } 100% { opacity: 1; } }

.audio-player-control { flex-grow: 1; height: 32px; }

.rich-toolbar {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.tool-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.12s;
}
.tool-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.tool-btn:active { background: #e2e8f0; }

.tool-btn.structure-btn {
    background: var(--brand-light);
    color: var(--brand-text);
    border-color: #c7d2fe;
}
.tool-btn.structure-btn:hover { background: #e0e7ff; border-color: #a5b4fc; }
.tool-divider { width: 1px; height: 16px; background: var(--border); margin: 0 4px; }

.rich-editor-wrapper {
    flex: 1;
    min-height: 0;
    display: flex;
    position: relative;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-surface);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.rich-editor-content {
    flex: 1;
    min-height: 0;
    padding: 16px 20px;
    font-size: 19px;
    line-height: 1.95;
    direction: rtl;
    text-align: right;
    outline: none;
    overflow-y: auto;
    color: var(--text-primary);
}
.rich-editor-content:focus { background-color: #fafbfd; }

.studio-scratchpad {
    height: 70px;
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
    direction: rtl;
    outline: none;
    resize: none;
    background: var(--bg-surface);
    color: var(--text-secondary);
    flex-shrink: 0;
}
.studio-scratchpad:focus { border-color: var(--brand); color: var(--text-primary); }

.studio-footer-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.side-tabs-header { display: flex; border-bottom: 1px solid var(--border); background: #fafafa; flex-shrink: 0; }
.studio-rhyme-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
}
.studio-rhyme-search .search-box {
    width: 100%;
    max-width: 280px;
}
.side-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}
.side-tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); background: var(--bg-surface); }

/* ========================================================= */
/* חיפוש חרוזים                                              */
/* ========================================================= */
.search-layout {
    display: grid;
    grid-template-columns: 22% 34% 44%;
    gap: 12px;
    padding: 12px 18px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.cat-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand);
    margin: 8px 0 4px 0;
    padding-bottom: 2px;
    border-bottom: 1px dashed var(--border);
}
.cat-title-related { color: var(--text-muted); }
.word-item {
    padding: 6px 9px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.1s;
}
.word-item:hover { background-color: var(--bg-elevated); }
.word-exact { color: #047857; font-weight: 600; }
.word-with-trans { color: var(--brand-text); font-weight: 600; }
.word-trans-tag {
    font-size: 0.75rem;
    background: var(--brand-light);
    color: var(--brand-text);
    padding: 1px 6px;
    border-radius: 3px;
}

.song-card {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: all 0.15s;
    background: var(--bg-surface);
}
.song-card:hover { border-color: #a5b4fc; background-color: #fafbfc; }
.song-card.selected { border-color: var(--brand); background-color: var(--brand-light); }
.song-card-title { font-size: 0.84rem; font-weight: 700; color: var(--brand); }
.song-card-line { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); margin-top: 3px; }

.preview-meta {
    font-size: 0.84rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.preview-lyrics {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-line;
    color: var(--text-primary);
}

.highlight-line {
    background-color: var(--brand-light);
    color: var(--brand-text);
    font-weight: 700;
    padding: 6px 12px;
    border-right: 4px solid var(--brand);
    border-radius: 4px;
    display: block;
    margin: 4px 0;
}
.highlight-rhyme-partner {
    background-color: #eef2ff;
    color: var(--brand-text);
    font-weight: 700;
    padding: 6px 12px;
    border-right: 4px solid #818cf8;
    border-radius: 4px;
    display: block;
    margin: 4px 0;
}

/* ========================================================= */
/* תיקון מלא וסופי לגלילת מאגר החרוזים                       */
/* ========================================================= */
#screen-groups {
    height: calc(100vh - 116px) !important;
    max-height: calc(100vh - 116px) !important;
    overflow: hidden !important;
}

#screen-groups .groups-layout {
    display: grid !important;
    grid-template-columns: 32% 68% !important;
    gap: 12px !important;
    padding: 12px 20px !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

#screen-groups .panel {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}

#screen-groups #groups-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
}

#screen-groups #subgroups-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: scroll !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 12px 14px 40px 14px !important;
}

#subgroups-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}
.songs-layout-3col {
    display: grid;
    grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
    gap: 12px;
    padding: 12px 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.group-row {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.1s;
}
.group-row:hover { background: var(--bg-elevated); }
.group-row.selected { background: var(--brand-light); font-weight: 600; color: var(--brand-text); }

.words-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
}
.badge-word {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.88rem;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.badge-word .edit-word-btn {
    color: var(--brand);
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.7;
}
.badge-word .edit-word-btn:hover { opacity: 1; }

.group-actions-bar {
    background: #fafafa;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

/* ========================================================= */
/* אמנים ואלבומים                                            */
/* ========================================================= */
.artists-layout-2col {
    display: grid;
    grid-template-columns: 30% 70%;
    gap: 14px;
    padding: 12px 20px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.singer-album-split {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.section-body-split {
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 8px 12px;
    gap: 14px;
}
.section-preview-pane {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    gap: 6px;
    flex-shrink: 0;
}
.fixed-square-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-shrink: 0;
}
.fixed-square-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fixed-square-preview span {
    font-size: 2.2rem;
    color: #94a3b8;
}
.preview-controls-row {
    display: flex;
    gap: 4px;
    width: 100%;
    justify-content: center;
}
.section-list-pane {
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    padding-right: 10px;
}
.artist-card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 2px;
    user-select: none;
}
.artist-card-item:hover { background-color: var(--bg-elevated); }
.artist-card-item.selected { background-color: var(--brand-light); color: var(--brand-text); font-weight: 600; }

/* ========================================================= */
/* הוספת שיר למאגר                                          */
/* ========================================================= */
.editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 10px 18px;
    gap: 8px;
    overflow: hidden;
}
.meta-strip-grid {
    display: grid;
    grid-template-columns: 2.2fr 2fr 1.3fr 2fr 2fr 85px;
    gap: 10px;
    background: var(--bg-surface);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    align-items: flex-end;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.field-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.field-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.meta-strip-grid input, .meta-strip-grid select {
    border: 1px solid var(--border-strong);
    border-radius: 5px;
    padding: 6px 9px;
    font-size: 0.88rem;
    direction: rtl;
    outline: none;
    background: var(--bg-surface);
    width: 100%;
}
.meta-strip-grid input:focus, .meta-strip-grid select:focus { border-color: var(--brand); }

.editor-main-area {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 10px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.editor-textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    font-size: 18px;
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    outline: none;
    resize: none;
    background: var(--bg-surface);
    color: var(--text-primary);
}
.rhyme-indicator-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}
.rhyme-badge-item {
    padding: 4px 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-surface);
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

/* ========================================================= */
/* מודאלים                                                   */
/* ========================================================= */
.about-modal-body {
    padding: 22px 24px;
    line-height: 1.6;
}
.about-lead-box {
    background: var(--brand-light);
    border-right: 4px solid var(--brand);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-text);
    margin-bottom: 14px;
}
.about-feature-item {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-right: 4px;
}
.about-feature-item b { color: var(--text-primary); }
.about-footer-info {
    border-top: 1px dashed var(--border-strong);
    padding-top: 12px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    color: #475569;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-card {
    background: var(--bg-surface);
    width: 500px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.modal-header {
    background: #0f172a;
    color: white;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.96rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
}
.modal-close:hover { color: #ffffff; }
.modal-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 70vh;
    overflow-y: auto;
}
.modal-body label {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    display: block;
}
.modal-body input[type="text"], .modal-body select {
    width: 100%;
    padding: 7px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-size: 0.95rem;
    direction: rtl;
    background: var(--bg-surface);
}
.modal-option-box {
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    background: #fafafa;
}
.wizard-preview-container {
    background: var(--brand-light);
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 0.84rem;
    color: var(--brand-text);
    max-height: 80px;
    overflow-y: auto;
}
.modal-footer {
    background: #fafafa;
    padding: 12px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    border-top: 1px solid var(--border);
}

#image-viewer-modal .modal-card {
    width: auto;
    max-width: 90vw;
    background: transparent;
    box-shadow: none;
}
#image-viewer-modal img {
    max-width: 80vw;
    max-height: 80vh;
    border-radius: 8px;
    border: 2px solid #ffffff;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    background: #ffffff;
}

#context-menu {
    position: absolute;
    display: none;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 4px 0;
    z-index: 2000;
    min-width: 160px;
}
.context-item {
    padding: 7px 14px;
    font-size: 0.86rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.context-item:hover { background-color: var(--bg-elevated); }

#custom-tooltip {
    position: absolute;
    display: none;
    background: #0f172a;
    color: #f8fafc;
    padding: 5px 11px;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    pointer-events: none;
    z-index: 3000;
    box-shadow: var(--shadow-md);
}

/* אפשור גלילה מלאה וחלקה בתצוגת תתי-הקבוצות והמילים */
#subgroups-container {
    overflow-y: auto !important;
    max-height: 100%;
    padding-bottom: 40px;
}

#screen-groups .groups-layout {
    height: calc(100vh - 120px);
}

#screen-groups .panel-body {
    overflow-y: auto !important;
}

/* סידור תצוגת הכרטיסיות והמילים במאגר החרוזים */
#subgroups-container > div {
    min-height: fit-content !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
}

#subgroups-container .words-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 10px 12px 14px 12px !important;
    min-height: 42px !important;
    overflow: visible !important;
}

#subgroups-container .badge-word {
    padding: 5px 12px !important;
    line-height: 1.4 !important;
    height: auto !important;
}
/* ========================================================= */
/* בורר שפה בתפריט העליון ובמסך הראשי                       */
/* ========================================================= */
.lang-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.lang-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.lang-pill {
    background: #334155;
    color: #e2e8f0;
    font-size: 0.74rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: bold;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 42px;
    right: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    z-index: 2500;
}

.lang-dropdown-content.show {
    display: block;
}

.lang-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.86rem;
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s;
}

.lang-option-item:hover {
    background: var(--bg-elevated);
    color: var(--brand);
}

.lang-check {
    color: var(--brand);
    font-weight: bold;
}

/* כרטיסיות שפה במסך הראשי (Dashboard) */
.dashboard-lang-selector-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-lang-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-lang-cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.dash-lang-card {
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    background: var(--bg-surface);
    transition: all 0.2s ease;
}

.dash-lang-card:hover {
    border-color: #cbd5e1;
    background: var(--bg-base);
}

.dash-lang-card.active {
    border-color: var(--brand);
    background: #f5f3ff;
}

.dash-lang-card-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.dash-lang-card-text {
    flex-grow: 1;
}

.dash-lang-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.dash-lang-card.active .dash-lang-title {
    color: var(--brand-text);
}

.dash-lang-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dash-lang-status {
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.dash-lang-card.active .dash-lang-status {
    background: var(--brand);
    color: #ffffff;
}
/* אפשור לתפריט השפות לבלוט מתוך סרגל הניווט */
.nav-bar {
    overflow: visible !important;
    position: relative;
    z-index: 50;
}

.lang-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.lang-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    height: 100%;
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    background: #ffffff;
    min-width: 210px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    z-index: 9999;
}

.lang-dropdown-content.show {
    display: block;
}
/* פריסה של שורת השדות במסך הוספת שיר בשורה אחת מלאה */
.ingest-fields-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: flex-end !important;
    width: 100% !important;
    min-width: 0;
    margin-bottom: 12px !important;
}

.ingest-fields-row .form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 !important;
    flex: 1 1 0;
    min-width: 0;
}
.ingest-fields-row .ingest-field-title {
    flex: 1.5 1 0;
}
.ingest-fields-row .ingest-field-track {
    flex: 0 0 58px;
    width: 58px;
}

.ingest-fields-row .form-group label {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: var(--text-secondary);
}

.ingest-fields-row .modern-input,
.ingest-fields-row .modern-select {
    height: 34px !important;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    padding: 4px 8px !important;
    font-size: 0.82rem !important;
    box-sizing: border-box !important;
}

.searchable-select {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.person-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}
.person-chips:empty { display: none; }
.person-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    background: #e8f0fe;
    color: var(--text-primary);
    border-radius: 999px;
    padding: 1px 4px 1px 8px;
    font-size: 0.74rem;
    font-weight: 650;
}
.person-chip button {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0 2px;
}
.searchable-select .searchable-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    inset: 0 auto auto 0;
}
.searchable-menu {
    position: fixed;
    z-index: 80;
    max-height: 220px;
    overflow: auto;
    background: var(--bg-surface, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm, 0 8px 24px rgba(15, 23, 42, 0.12));
}
.searchable-option {
    display: block;
    width: 100%;
    text-align: right;
    background: transparent;
    border: 0;
    padding: 7px 10px;
    cursor: pointer;
    color: var(--text-primary);
    font: inherit;
}
.searchable-option.is-active,
.searchable-option:hover {
    background: #e8f0fe;
}
.searchable-option.is-add {
    color: var(--brand);
    font-weight: 700;
    border-top: 1px solid var(--border-subtle, #e2e8f0);
}
.searchable-empty {
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* פרופורציות בין השדות כדי שכולם ייכנסו היטב */
.ingest-fields-row .flex-wide {
    flex: 2.2 !important;
    min-width: 140px;
}

.ingest-fields-row .flex-med {
    flex: 1.8 !important;
    min-width: 110px;
}

.ingest-fields-row .flex-narrow {
    flex: 0.9 !important;
    min-width: 65px;
    max-width: 75px;
}

/* ========================================================== */
/* רשימת טייקים והקלטות מרובות בסטודיו (Multi-Takes)          */
/* ========================================================== */

#studio-takes-wrapper {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

#studio-takes-list::-webkit-scrollbar {
    width: 6px;
}

#studio-takes-list::-webkit-scrollbar-track {
    background: var(--bg-elevated);
    border-radius: 4px;
}

#studio-takes-list::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

#studio-takes-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.take-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.take-item-row:hover {
    background-color: var(--bg-base);
    border-color: var(--border-strong);
}

.take-final-badge {
    background: #16a34a;
    color: #ffffff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: bold;
}

/* ========================================================== */
/* עמודת אודיו מרכזית בסטודיו (Audio & Takes Column)          */
/* ========================================================== */

.studio-audio-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.audio-col-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audio-col-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 5px;
}

.take-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.take-item-row:hover {
    background-color: var(--bg-base);
    border-color: var(--border-strong);
}

.take-final-badge {
    background: #16a34a;
    color: #ffffff;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.68rem;
    font-weight: bold;
}

/* ========================================================= */
/* שורת Dashboard עליונה קומפקטית ומאוחדת                     */
/* ========================================================= */
.dash-top-unified-bar {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 14px;
    align-items: stretch;
    height: 76px;
    flex-shrink: 0;
}

.dash-quick-actions-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
}

.dash-quick-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    text-align: right;
    transition: all 0.15s ease;
    height: 100%;
}

.dash-quick-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.dash-quick-btn.action-new {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    border: none;
}
.dash-quick-btn.action-new:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3);
}

.dash-quick-btn.action-search {
    border-right: 4px solid var(--brand);
}
.dash-quick-btn.action-search:hover {
    border-color: var(--brand);
}

.quick-btn-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}
.quick-btn-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.quick-btn-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}
.quick-btn-sub {
    font-size: 0.74rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-lang-unified-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.dash-lang-unified-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
}

.dash-lang-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    flex-grow: 1;
    height: 100%;
}

.dash-mini-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-surface);
    cursor: pointer;
    transition: all 0.15s ease;
    height: 100%;
}

.dash-mini-card:hover {
    background: var(--bg-base);
    border-color: var(--border-strong);
}

.dash-mini-card.active {
    border-color: var(--brand);
    background: #f5f3ff;
}

.mini-card-icon {
    font-size: 1.35rem;
}

.mini-card-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mini-card-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
}
.dash-mini-card.active .mini-card-name {
    color: var(--brand-text);
}

.mini-card-badge {
    font-size: 0.68rem;
    color: var(--text-muted);
}
.dash-mini-card.active .mini-card-badge {
    color: var(--brand);
    font-weight: 600;
}

/* ========================================================= */
/* סייר תיקיות ופרויקטים (Explorer, Pinned & Drag & Drop)    */
/* ========================================================= */
.dash-explorer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.explorer-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 14px;
    box-shadow: var(--shadow-sm);
}

.explorer-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.crumb-item {
    cursor: pointer;
    color: var(--brand);
    transition: opacity 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.crumb-item:hover {
    text-decoration: underline;
}

.view-size-selector {
    display: inline-flex;
    background: var(--bg-elevated);
    border-radius: 6px;
    padding: 2px;
    border: 1px solid var(--border);
}
.view-size-btn {
    border: none;
    background: transparent;
    padding: 3px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.15s;
}
.view-size-btn:hover {
    color: var(--text-primary);
}
.view-size-btn.active {
    background: #ffffff;
    color: var(--brand);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    font-weight: bold;
}

/* שורת נעיצה */
.pinned-folders-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.pinned-folders-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.pinned-folder-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s;
    white-space: nowrap;
}
.pinned-folder-chip:hover {
    border-color: var(--brand);
    background: #f5f3ff;
    transform: translateY(-1px);
}
.pinned-folder-chip .unpin-icon {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 2px;
}
.pinned-folder-chip .unpin-icon:hover {
    color: var(--danger);
}

/* רשת פריטי הסייר */
.explorer-items-grid {
    display: grid;
    gap: 12px;
    transition: all 0.2s ease;
}

/* מצבי תצוגה: רגיל / קומפקטי / גדול */
.explorer-items-grid.view-normal {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.explorer-items-grid.view-compact {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.explorer-items-grid.view-large {
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

/* כרטיסיית תיקייה */
.explorer-card-folder {
    background: #fff8eb;
    border: 1.5px dashed #e8d4a8;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    user-select: none;
}
.explorer-card-folder:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.explorer-card-folder.drag-over {
    border-color: var(--brand) !important;
    background: #eef2ff !important;
    border-style: solid !important;
    transform: scale(1.03);
}

/* קריטי לגרירה: מונע מאיקון התיקייה והטקסט לשבור את הגרירה */
.explorer-card-folder > * {
    pointer-events: none;
}
.explorer-card-folder button {
    pointer-events: auto; /* מאפשר לחיצה על כפתור הנעיצה */
}

.folder-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}
.folder-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}
.folder-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.folder-items-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* כרטיסיית שיר */
.explorer-card-song {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
    cursor: grab;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
    position: relative;
}
.explorer-card-song:hover {
    border-color: #a5b4fc;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.explorer-card-song:active {
    cursor: grabbing;
}
.explorer-card-song.dragging {
    opacity: 0.45;
    border-style: dashed;
}

.song-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.song-doc-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.song-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.song-card-snippet {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.song-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    padding-top: 6px;
    margin-top: 6px;
}

/* התאמות גודל קומפקטי */
.view-compact .explorer-card-folder {
    padding: 8px 10px;
}
.view-compact .explorer-card-song {
    min-height: 70px;
    padding: 8px 10px;
}
.view-compact .song-card-snippet {
    display: none;
}

/* תפריט נפתח דו-עמודי המוצמד לשמאל הכפתור ונפתח פנימה אל תוך החלון */
.two-columns-dropdown {
    display: none;
    position: absolute;
    top: 46px;
    left: 0 !important;
    right: auto !important;
    background: #ffffff;
    min-width: 320px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 14px !important;
    z-index: 99999 !important;
}

.two-columns-dropdown.show {
    display: flex !important;
    gap: 12px;
}

.dropdown-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-column-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand, #4f46e5);
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
    margin-bottom: 5px;
    text-align: center;
}

.dropdown-divider-v {
    width: 1px;
    background: var(--border);
    margin: 0 4px;
}

.two-columns-dropdown .lang-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.82rem;
    transition: background 0.15s;
}

.two-columns-dropdown .lang-option-item:hover {
    background: var(--bg-hover, #f1f5f9);
}

.two-columns-dropdown .lang-check {
    color: #16a34a;
    font-weight: bold;
}

/* ========================================================= */
/* תוספות Material You: אייקונים, Sidebar מרחף וכפתורי Pill */
/* ========================================================= */

.svg-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* מעטפת האפליקציה הראשית */
.app-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
    min-height: 0;
}

/* סרגל צד מתקפל אוטומטית במעבר עכבר (:hover) */
.sidebar {
    width: 66px; /* רוחב מצומצם כברירת מחדל */
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    z-index: 50;
    transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.26s ease;
}

/* התרחבות אוטומטית במעבר עכבר או במצב נעוץ */
.sidebar:hover,
.sidebar.pinned {
    width: 220px;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
}

.sidebar.pinned {
    box-shadow: none;
}

.sidebar-pin-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 14px 2px 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar:hover .sidebar-pin-header,
.sidebar.pinned .sidebar-pin-header {
    opacity: 1;
}

.sidebar.pinned .sidebar-pin-btn {
    background: var(--bg-sidebar-active);
    color: var(--brand);
}

.sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 9999px; /* כפתור Pill */
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.18s ease;
    min-height: 42px;
}

.sidebar-nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: var(--bg-sidebar-active);
    color: var(--brand-text);
    font-weight: 700;
}

.sidebar-nav-item.active .svg-icon {
    stroke-width: 2.3;
    color: var(--brand);
}

.sidebar-nav-item .nav-label {
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sidebar:hover .sidebar-nav-item .nav-label,
.sidebar.pinned .sidebar-nav-item .nav-label {
    opacity: 1;
    transform: translateX(0);
}

/* אזור התוכן הראשי המעוגל */
.main-content-area {
    flex: 1;
    background: var(--bg-surface);
    margin: 8px 10px 8px 8px;
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* עיגול כפתורים ל-Pill */
.btn-pill,
.btn-primary,
.btn-secondary,
.btn-danger {
    border-radius: 9999px !important;
}

.btn-pill-outlined {
    background-color: var(--bg-surface);
    color: var(--brand);
    border: 1px solid var(--brand);
    padding: 6px 14px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-pill-outlined:hover {
    background-color: var(--bg-sidebar-hover);
}

.icon-circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.18s ease;
}

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

/* ========================================================= */
/* שורת 4 רובריקות שוות בדשבורד (פלטת צבעי פסטל Material)     */
/* ========================================================= */
.dash-top-4col-bar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 14px;
    align-items: stretch;
    height: 90px;
    flex-shrink: 0;
}

.dash-hero-card {
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}
.dash-hero-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
}

.hero-card-blue {
    background: var(--tag-blue-bg, #d3e3fd) !important;
    color: var(--tag-blue-text, #041e49) !important;
}
.hero-card-green {
    background: var(--tag-green-bg, #c4eed0) !important;
    color: var(--tag-green-text, #072711) !important;
}
.hero-card-yellow {
    background: var(--tag-yellow-bg, #feefc3) !important;
    color: var(--tag-yellow-text, #5f4200) !important;
    cursor: default !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 10px 12px !important;
}
.hero-card-peach {
    background: var(--tag-peach-bg, #fad2cf) !important;
    color: var(--tag-peach-text, #5c1411) !important;
    cursor: default !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: 10px 12px !important;
}

.hero-card-icon-pill {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hero-card-icon-pill .svg-icon {
    width: 22px;
    height: 22px;
}

.hero-card-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hero-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}
.hero-card-sub {
    font-size: 0.74rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-lang-box-title {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.hero-lang-pills-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
}

.lang-choice-pill {
    border: none;
    background: rgba(255, 255, 255, 0.65);
    color: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 9999px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.lang-choice-pill:hover {
    background: #ffffff;
}
.lang-choice-pill.active {
    background: var(--brand, #0b57d0) !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}

/* ========================================================= */
/* אחידות Material You מלאה לכל המסכים, הכרטיסיות והכפתורים */
/* ========================================================= */

/* כרטיסיות שירים ומופעים */
.song-card,
.artist-card-item,
.group-row,
.take-item-row,
.audio-col-card {
    border-radius: 12px !important;
    transition: all 0.16s ease !important;
}

.song-card:hover,
.artist-card-item:hover,
.group-row:hover {
    background-color: var(--bg-sidebar-hover) !important;
    border-color: var(--brand) !important;
}

.song-card.selected,
.artist-card-item.selected,
.group-row.selected {
    background-color: var(--bg-sidebar-active) !important;
    color: var(--brand-text) !important;
    border-color: var(--brand) !important;
}

/* תגיות מילים במאגר החרוזים */
.badge-word {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    border-radius: 9999px !important;
    padding: 5px 14px !important;
    transition: all 0.15s ease !important;
}

.badge-word:hover {
    background: var(--tag-blue-bg) !important;
    border-color: var(--brand) !important;
}

/* כפתורי סרגל עיצוב הטקסט וכפתורי מבנה ([בית], [פזמון]) */
.tool-btn {
    border-radius: 9999px !important;
    padding: 4px 12px !important;
}

.tool-btn.structure-btn {
    background: var(--tag-blue-bg) !important;
    color: var(--tag-blue-text) !important;
    border-color: transparent !important;
}

.tool-btn.structure-btn:hover {
    background: var(--brand) !important;
    color: #ffffff !important;
}

/* בורר גודל תצוגה בדשבורד */
.view-size-selector {
    border-radius: 9999px !important;
    padding: 3px !important;
}

.view-size-btn {
    border-radius: 9999px !important;
}

/* שורות קלט מודרניות */
.modern-input,
.studio-meta-bar,
.rich-toolbar,
.rich-editor-wrapper,
.studio-footer-strip,
.explorer-toolbar-row {
    border-radius: 14px !important;
}

/* יישור אייקון גיבוי ושחזור כשהתפריט מקופל והזחה עדינה רק כשהתפריט פתוח */
.sidebar:hover .sidebar-sub-item,
.sidebar.pinned .sidebar-sub-item {
    padding-inline-start: 24px;
    font-size: 0.82rem;
}

/* ==========================================
   מסכי הגדרות וגיבוי מודרניים (Toggle Switches & Constrained Layout)
   ========================================== */
.settings-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px 20px 20px;
    background: var(--bg-app);
}

.settings-container-constrained {
    max-width: 940px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.backup-container-constrained {
    max-width: 1180px;
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 430px 1fr;
    gap: 16px;
    align-items: start;
}

.backup-left-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

#selective-restore-panel {
    flex-direction: column !important;
}

@media (max-width: 900px) {
    .backup-container-constrained {
        grid-template-columns: 1fr;
    }
}

.settings-card-modern {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.settings-card-header-modern {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.settings-card-title-modern {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-primary);
}

.settings-icon-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.settings-row-modern {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
}

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

.settings-row-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.settings-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-row-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* מתג הזזה מודרני (Toggle Switch) */
.modern-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.modern-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.modern-switch-slider {
    position: absolute;
    inset: 0;
    background-color: #e2e8f0;
    border: 1.5px solid #cbd5e1;
    border-radius: 999px;
    transition: 0.22s ease;
}

.modern-switch-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 2.5px;
    background-color: #64748b;
    border-radius: 50%;
    transition: 0.22s ease;
}

.modern-switch input:checked + .modern-switch-slider {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.modern-switch input:checked + .modern-switch-slider::before {
    transform: translateX(19px);
    background-color: #ffffff;
}

/* גלולות בחירה לשפות (Lang Pills) */
.lang-pills-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lang-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--border);
    background: #ffffff;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
}

.lang-toggle-pill input {
    accent-color: #1d4ed8;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.lang-toggle-pill:has(input:checked) {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

/* רשימת גיבויים ללא חיתוך בתחתית */
.backups-scroll-container {
    max-height: calc(100vh - 280px);
    min-height: 220px;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.backup-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s, background-color 0.15s;
}

.backup-item-card:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

/* ==========================================
   מנוע העשרת נתונים (Smart Data Enrichment Popover & Folder)
   ========================================== */
.enrichment-badge-count {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #1d4ed8;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    pointer-events: none;
}

.enrichment-popover-card {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    width: 440px;
    max-width: 92vw;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    z-index: 2500;
    overflow: hidden;
}

[dir="ltr"] .enrichment-popover-card {
    left: auto;
    right: 0;
}

.enrichment-popover-card.show {
    display: block;
}

.enrichment-popover-header {
    padding: 11px 15px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.enrichment-popover-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: min(70vh, 520px);
    overflow: auto;
}
.dup-diff-list { display: flex; flex-direction: column; gap: 8px; }
.dup-diff-field {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dup-diff-label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.dup-diff-choice {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-primary);
    cursor: pointer;
}

.enrichment-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

/* תיקיית מערכת חכמה בתוך סייר הדשבורד */
.explorer-card-enrichment {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%) !important;
    border: 1.5px dashed #93c5fd !important;
}

.explorer-card-enrichment:hover {
    border-color: #1d4ed8 !important;
    background: #eff6ff !important;
}

/* תזכורת הקשר עדינה במסכים פנימיים */
.contextual-nudge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.contextual-nudge-pill:hover {
    background: #dbeafe;
}

/* ========================================================== */
/* מסך אמנים ואלבומים                                          */
/* ========================================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.artists-screen [hidden] {
    display: none !important;
}

.artists-screen .action-strip {
    height: auto;
    min-height: 48px;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
}

.artists-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.artists-screen-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.96rem;
    white-space: nowrap;
}

.artists-search-box {
    flex: 1;
    min-width: 180px;
    max-width: 380px;
    border-radius: 999px;
}

.artists-layout {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    gap: 14px;
    padding: 14px 20px 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.artists-sidebar-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.artists-tabs-header {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.artist-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 4px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    text-align: center;
}
.artist-tab-btn:hover { color: var(--text-primary); background: rgba(0,0,0,0.03); }
.artist-tab-btn.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    background: var(--bg-surface);
    font-weight: 700;
}
.artist-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.15rem;
    margin-inline-start: 4px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}
.artist-tab-btn.active .artist-tab-count {
    background: var(--brand-light);
    color: var(--brand-text);
}

.artists-main-content-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.artist-profile-header-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    min-height: 145px;
}

.artist-profile-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.artist-bio-text-area {
    min-width: 0;
}

.artist-profile-bio {
    max-height: 4.9em;
    overflow-y: auto;
}

.artist-profile-header-card.is-empty {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.artist-profile-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

#artist-profile-name {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.artist-role-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.artist-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.artist-role-icon .svg-icon {
    width: 18px;
    height: 18px;
}
.artist-role-icon.is-singers { color: #16a34a; }
.artist-role-icon.is-authors { color: var(--brand); }
.artist-role-icon.is-composers { color: #d97706; }

.artist-role-badge {
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 2px 8px;
}

.artist-role-badge.role-author { background: var(--tag-blue-bg); color: var(--tag-blue-text); }
.artist-role-badge.role-composer { background: var(--tag-yellow-bg); color: var(--tag-yellow-text); }
.artist-role-badge.role-singer { background: var(--tag-green-bg); color: var(--tag-green-text); }

.artist-profile-bio {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.artist-bio-empty { color: var(--text-muted); }

.text-link-btn {
    border: 0;
    background: none;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.artist-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.artist-profile-img-box {
    width: 112px;
    height: 112px;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    color: var(--text-muted);
}
.artist-profile-img-box:disabled {
    cursor: default;
}
.artist-profile-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.artist-portrait-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}
.artist-portrait-caption {
    font-size: 0.68rem;
    font-weight: 700;
}

/* ========================================================== */
/* אפקט היפוך אלבומים (Flip Card Animation)                    */
/* ========================================================== */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    display: grid;
    cursor: pointer;
}
.flip-card::before {
    content: "";
    grid-area: 1 / 1;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 34px;
    visibility: hidden;
    pointer-events: none;
}

.flip-card-inner {
    grid-area: 1 / 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    text-align: right;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner,
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: #f8fafc;
    padding: 10px 12px;
    overflow: hidden;
}

.album-front-cover,
.album-front-placeholder {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    background: #f1f5f9;
}
.album-front-cover {
    object-fit: cover;
}
.album-front-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #94a3b8;
}

.album-front-footer {
    flex: 0 0 34px;
    height: 34px;
    padding: 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    font-weight: 700;
    box-sizing: border-box;
}
.album-footer-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.album-edit-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.album-edit-btn .svg-icon { width: 13px; height: 13px; }
.album-back-footer {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
    direction: ltr;
    padding-top: 8px;
}

.album-songs-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
.album-songs-list li {
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    gap: 6px;
    align-items: center;
}
.album-songs-list li span.track-num {
    color: var(--brand);
    font-weight: bold;
    min-width: 18px;
}

.artists-list-meta {
    padding: 8px 12px 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.artists-names-list.panel-body {
    padding: 6px;
}

.artists-screen .artist-card-item {
    gap: 8px;
    width: 100%;
    min-height: 42px;
    border: 1px solid transparent !important;
    background: transparent;
    text-align: right;
}

.artist-glyph {
    display: inline-flex;
    flex-shrink: 0;
}
.artist-glyph.authors { color: var(--brand); }
.artist-glyph.composers { color: #b45309; }
.artist-glyph.singers { color: #15803d; }

.artist-row-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.artist-row-edit {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-strong);
    background: var(--bg-surface);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    opacity: 0;
}
.artist-row-edit .svg-icon { width: 14px; height: 14px; }
.artist-card-item:hover .artist-row-edit,
.artist-card-item:focus-within .artist-row-edit,
.artist-card-item.selected .artist-row-edit {
    opacity: 1;
}
.artist-row-edit:hover {
    color: var(--brand-text);
    border-color: var(--brand);
}

.artists-albums-panel {
    flex: 1;
    min-height: 0;
}

.albums-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.albums-section-hint {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
}

.albums-flip-grid.panel-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
    gap: 14px;
    padding: 16px;
    align-content: start;
}
.albums-flip-grid.size-small { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.albums-flip-grid.size-large { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.albums-flip-grid.is-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.albums-panel-header { gap: 10px; flex-wrap: wrap; }
.albums-view-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.albums-icon-toggle .view-size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 26px;
    padding: 0;
}
.albums-icon-toggle .svg-icon { width: 15px; height: 15px; }
.album-list-group { display: flex; flex-direction: column; gap: 2px; }
.album-list-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand);
    padding: 4px 2px 6px;
    border-bottom: 1px solid var(--border);
}
.album-list-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: none;
    background: transparent;
    text-align: right;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.album-list-row:hover { background: var(--brand-light); }
.album-list-empty { color: var(--text-muted); font-size: 0.82rem; padding: 6px 8px; }

.artists-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
    min-height: 180px;
    padding: 28px 16px;
}

.artists-names-list .artists-empty-state {
    min-height: 150px;
}

.artists-empty-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
}

.artists-empty-sub {
    margin: 0 0 6px;
    max-width: 360px;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

button.flip-card-front {
    padding: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    appearance: none;
}

.album-card-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-card-count {
    flex-shrink: 0;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

.album-front-placeholder .svg-icon {
    width: 42px;
    height: 42px;
}

.album-card-back-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--brand);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.album-card-back-head span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-close-btn {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.album-songs-list li {
    display: block;
    padding: 0;
    border: 0;
}

.album-song-link {
    width: 100%;
    display: flex;
    gap: 6px;
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px dashed var(--border-subtle);
    padding: 7px 2px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: right;
}
.album-song-link:hover { color: var(--brand); }
.album-song-link span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.album-empty-note {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 8px 0 0;
}

.artists-screen :focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.artists-screen .search-box :focus-visible {
    outline: none;
}

.flip-card-front:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 3px var(--brand);
}

@media (max-width: 980px) {
    .artists-layout {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(210px, 38%) minmax(280px, 1fr);
        overflow: auto;
    }
    .artists-sidebar-panel { min-height: 210px; }
}

@media (prefers-reduced-motion: reduce) {
    .flip-card-inner { transition: none; }
}

.tr-action-strip {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.tr-action-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tr-action-tools .modern-input { width: 180px; }
.translate-body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(140px, 0.36fr);
    gap: 12px;
    padding: 12px 16px 14px;
    direction: rtl;
}
.translate-pairs {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    direction: rtl;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
}
.translate-pair-head,
.translate-pair-foot,
.translate-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    direction: rtl;
}
.translate-pair-head {
    padding: 10px;
    flex-shrink: 0;
    align-items: start;
}
.translate-pair-foot {
    padding: 10px;
    flex-shrink: 0;
    align-items: center;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr) auto;
}
.tr-foot-target-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    flex-wrap: wrap;
}
.tr-sync-dupes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}
.tr-sync-dupes input { accent-color: var(--brand); }
.translate-pair-foot { border-top: 1px solid var(--border); }
.translate-pair-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0 10px 10px;
}
.tr-col-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}
.tr-col-head-row {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.tr-lang-banner-wrap {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.tr-lang-banner {
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #dbe4f0;
    background: #eef4fb;
    color: var(--text-primary);
    border-radius: 10px;
    padding: 10px 28px 10px 12px;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
}
html[dir="ltr"] .tr-lang-banner { padding: 10px 12px 10px 28px; }
.tr-lang-banner:hover { background: #e7eef8; }
.tr-lang-banner:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}
.tr-lang-chevron {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}
html[dir="ltr"] .tr-lang-chevron {
    left: auto;
    right: 10px;
}
.tr-load-song-btn {
    flex: 0 1 auto;
    justify-content: center;
    min-height: 40px;
    white-space: nowrap;
}
.tr-tabs-header {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
}
.tr-tabs-header .artist-tab-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}
.translate-row { margin-bottom: 6px; align-items: stretch; }
.translate-row > div { display: flex; min-width: 0; }
.translate-row > div > .tr-source-text,
.translate-row > div > .tr-target-line-shell,
.translate-row > div > .tr-target-line,
.translate-row > div > .tr-source-edit { flex: 1; }
.tr-target-cell {
    display: flex;
    align-items: stretch;
    min-width: 0;
}
.tr-target-line-shell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    gap: 4px;
    direction: rtl;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-surface);
    padding: 4px 6px;
}
.tr-target-line-shell > .tr-target-line {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 2px 2px;
    min-height: 28px;
}
.tr-target-line-shell.tr-mood-warm {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(217, 119, 6, 0.30);
}
.tr-target-line-shell.tr-mood-cold {
    background: rgba(225, 29, 72, 0.10);
    border-color: rgba(190, 18, 60, 0.28);
}
.tr-mood-lights {
    width: 11px;
    flex-shrink: 0;
    align-self: center;
    padding: 1px 0;
    border: none;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    border-radius: 999px;
}
.tr-mood-lights:hover { background: rgba(15, 23, 42, 0.05); }
.tr-mood-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0.4;
    transform: scale(1);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: none;
}
.tr-mood-dot.is-fire { background: #16a34a; }
.tr-mood-dot.is-warm { background: #f59e0b; }
.tr-mood-dot.is-cold { background: #be123c; }
.tr-mood-dot.is-active {
    opacity: 1;
    transform: scale(1.35);
}
.tr-mood-tip,
.tr-mood-pop {
    position: fixed;
    z-index: 4500;
    pointer-events: none;
}
.tr-mood-tip {
    background: #0f172a;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    white-space: nowrap;
}
.tr-mood-tip[hidden],
.tr-mood-pop[hidden] { display: none !important; }
.tr-mood-pop {
    pointer-events: auto;
    min-width: 168px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tr-mood-option {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
    text-align: right;
}
.tr-mood-option:hover,
.tr-mood-option.is-selected { background: var(--bg-elevated); }
.tr-mood-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.tr-mood-swatch.is-fire { background: #16a34a; }
.tr-mood-swatch.is-warm { background: #f59e0b; }
.tr-mood-swatch.is-cold { background: #be123c; }
html[dir="ltr"] .tr-mood-option { text-align: left; }
.tr-source-text,
.tr-target-line,
.tr-source-edit {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 8px;
    font: inherit;
    line-height: 1.45;
    background: #f8fafc;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-height: 36px;
    color: var(--text-primary);
}
.tr-target-line[contenteditable="true"] {
    background: var(--bg-surface);
    outline: none;
}
.tr-target-line.tr-locked { color: var(--text-muted); }
.tr-source-edit {
    resize: none;
    overflow: hidden;
    background: var(--bg-surface);
}
.tr-word { border-bottom: 1px dotted transparent; cursor: help; }
.tr-word:hover { border-bottom-color: var(--brand); color: var(--brand); }
.tr-word-pop {
    position: fixed;
    z-index: 4000;
    max-width: 280px;
    background: #0f172a;
    color: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.45;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}
.tr-word-pop b { display: block; margin-bottom: 2px; }
.translate-rhyme {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    padding: 0;
}
.translate-rhyme .side-tabs-header {
    border-radius: 12px 12px 0 0;
}
.translate-rhyme .tr-rhyme-lang,
.translate-rhyme .search-box {
    margin: 8px 12px 0;
    width: auto !important;
}
.translate-rhyme .tr-rhyme-results {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 8px 12px 12px;
}
html[dir="ltr"] .translate-rhyme { direction: ltr; }
.tr-rhyme-title { font-weight: 700; margin-bottom: 2px; }
.tr-rhyme-lang { color: var(--text-secondary); font-size: 0.78rem; margin-bottom: 8px; }
.tr-rhyme-results { display: flex; flex-direction: column; gap: 4px; }
.tr-rhyme-word, .tr-rhyme-line {
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 6px 8px;
    text-align: inherit;
    cursor: pointer;
    font: inherit;
}
.tr-rhyme-word:hover, .tr-rhyme-line:hover { border-color: var(--brand); }
.tr-rhyme-group { font-size: 0.75rem; font-weight: 700; color: var(--text-secondary); margin-top: 8px; }
.tr-song-list { max-height: 360px; overflow: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tr-song-pick {
    text-align: inherit;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font: inherit;
}
.tr-song-pick:hover { border-color: var(--brand); }
.song-card-langs { font-size: 0.75rem; color: var(--text-secondary); margin: 2px 0 4px; }

/* ===== קהילת היוצרים ===== */
.sidebar-nav-item .nav-emoji {
    font-size: 1.05rem;
    line-height: 1;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.community-share-btn.is-published {
    background: #e8f5e9;
    border-color: #81c784;
    color: #2e7d32;
    font-weight: 700;
}
.community-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px 4px;
    background: #f0f4f9;
    border-bottom: 1px solid var(--border);
}
.community-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.community-search {
    flex: 1;
    min-width: 180px;
}
.community-pill {
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-primary);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.community-pill.active {
    background: #1558d6;
    border-color: #1558d6;
    color: #fff;
}
.community-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    padding: 16px;
}
.community-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.community-card:hover {
    border-color: #99b7f0;
    box-shadow: 0 6px 18px rgba(21, 88, 214, 0.08);
}
.community-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}
.community-card-author {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: 0;
}
.community-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.community-avatar.sm { width: 28px; height: 28px; }
.community-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d3e3fd;
    color: #041e49;
    font-weight: 700;
}
.community-author-name { font-weight: 700; font-size: 0.86rem; }
.community-card-date { color: var(--text-muted); font-size: 0.74rem; }
.community-card-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.community-tag {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    background: #eef3fb;
    color: #1e3a5f;
}
.community-tag-lang { background: #fff3e0; color: #8a5a00; }
.community-tag-cat { background: #f3e8ff; color: #6b21a8; }
.community-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
}
.community-lyrics-preview {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.86rem;
    line-height: 1.55;
    color: #334155;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    max-height: 7.2em;
    overflow: hidden;
}
.community-lyrics-preview.is-empty {
    color: var(--text-muted);
    font-style: italic;
}
.community-mini-player {
    display: flex;
    align-items: center;
    gap: 8px;
}
.community-play-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #1558d6;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
}
.community-progress {
    flex: 1;
    min-width: 0;
    accent-color: #1558d6;
    height: 6px;
    cursor: pointer;
}
.community-card-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}
.community-action-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.community-action-btn.is-liked {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}
.community-read-btn { margin-inline-start: auto; font-size: 0.78rem; padding: 5px 10px; }
.community-publish-card { width: min(520px, 94vw); }
.community-detail-card {
    width: min(820px, 96vw);
    max-height: 90vh;
}
.community-detail-card .modal-body {
    max-height: calc(90vh - 64px);
    overflow: auto;
}
.community-detail-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.community-detail-actions-top { display: flex; gap: 8px; flex-wrap: wrap; }
.community-detail-title {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 800;
}
.community-author-note {
    background: #f0f7ff;
    border: 1px solid #d6e6fb;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    line-height: 1.45;
}
.community-detail-player { margin-bottom: 12px; }
.community-detail-lyrics {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.75;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin: 0 0 14px;
}
.community-detail-interact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.community-comments-section {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.community-quick-feedback {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.community-chip {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.community-comment-compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.community-comment-compose textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    resize: vertical;
}
.community-comments-list { display: flex; flex-direction: column; gap: 10px; }
.community-comment {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}
.community-comment.is-author {
    border-color: #99b7f0;
    background: #f5f9ff;
}
.community-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
    font-size: 0.82rem;
}
.community-author-badge {
    background: #1558d6;
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 0.7rem;
    font-weight: 700;
}
.community-comment-del {
    margin-inline-start: auto;
    border: none;
    background: transparent;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}
.community-comment-text { font-size: 0.9rem; line-height: 1.5; }
.community-loading { padding: 40px 16px; }

@media (max-width: 720px) {
    .community-posts-grid { grid-template-columns: 1fr; padding: 12px; }
    .community-card-foot { flex-direction: column; align-items: stretch; }
    .community-read-btn { margin-inline-start: 0; }
}

/* ===== מרכז ניהול אדמין + באנר גלובלי ===== */
.global-announcement-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1558d6;
    color: #fff;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}
.global-announcement-text { flex: 1; }
.global-announcement-close {
    border: none;
    background: rgba(255,255,255,0.18);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.admin-control-card { width: min(980px, 96vw); max-height: 92vh; }
.admin-control-body { max-height: calc(92vh - 140px); overflow: auto; }
.admin-tabs {
    display: flex;
    gap: 6px;
    padding: 8px 14px 0;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.admin-tab {
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-secondary);
}
.admin-tab.active {
    background: #fff;
    border-color: var(--border);
    border-bottom-color: #fff;
    color: #1558d6;
    margin-bottom: -1px;
}
.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.admin-kpi-card {
    background: #f0f4f9;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.admin-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1558d6;
}
.admin-kpi-label { font-size: 0.82rem; font-weight: 700; color: #334155; margin-top: 4px; }
.admin-kpi-sub { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }
.admin-announcement-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.admin-announcement-box h4 { margin: 0 0 6px; }
.admin-hint { margin: 0 0 10px; font-size: 0.82rem; color: var(--text-muted); }
.admin-announcement-box textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    font: inherit;
    resize: vertical;
}
.admin-users-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.admin-users-toolbar .modern-input { flex: 1; min-width: 180px; }
.admin-users-table-wrap { overflow: auto; max-height: 52vh; border: 1px solid var(--border); border-radius: 12px; }
.admin-users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.admin-users-table th,
.admin-users-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    vertical-align: middle;
}
.admin-users-table th {
    background: #f0f4f9;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1;
}
.admin-users-table tr.is-suspended { background: #fff7f7; }
.admin-user-cell { display: flex; align-items: center; gap: 8px; }
.admin-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.admin-user-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #d3e3fd;
    color: #041e49;
    font-weight: 700;
}
.admin-user-name { font-weight: 700; }
.admin-user-email { color: var(--text-muted); font-size: 0.75rem; direction: ltr; text-align: right; }
.admin-tag {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #eef3fb;
    color: #1e3a5f;
}
.admin-tag-admin { background: #1558d6; color: #fff; }
.admin-tag-ok { background: #e8f5e9; color: #2e7d32; }
.admin-tag-blocked { background: #fee2e2; color: #b91c1c; }
.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.btn-xs {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 8px !important;
}

/* ===== PWA / Offline ===== */
.offline-status-banner {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 700;
    text-align: center;
    z-index: 40;
}
.offline-status-banner.is-offline {
    display: flex;
    background: #fff7ed;
    color: #9a3412;
    border-bottom: 1px solid #fed7aa;
}
.offline-status-banner.is-syncing {
    display: flex;
    background: #eff6ff;
    color: #1d4ed8;
    border-bottom: 1px solid #bfdbfe;
}
.pwa-install-slot { display: inline-flex; align-items: center; }
.pwa-install-btn {
    border: 1px solid #99b7f0;
    background: #fff;
    color: #1558d6;
    border-radius: 999px;
    padding: 6px 12px;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.pwa-install-btn:hover {
    background: #eef4ff;
    border-color: #1558d6;
}
body.is-offline .is-offline-disabled,
.is-offline-disabled {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(0.3);
}