/* Navigation Header Styles */
header.glass-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px !important;
    width: 100%;
    margin-bottom: 10px;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    letter-spacing: -1.5px;
}

.nav-admin-link {
    padding: 8px 16px;
    font-size: 11px;
    text-decoration: none;
    background: rgba(0, 122, 255, 0.1);
    color: #ffffff;
    border: 1px solid #576e87;
    border-radius: 10px;
    font-weight: 700;
}

.nav-admin-link:hover {
    background: var(--accent-blue);
    color: white;
}

.nav-new-task-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgb(255 255 255 / 15%);
    border: 1px solid rgba(79, 103, 115, 0.25);
    border-radius: 12px;
    color: rgb(18 18 18);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    backdrop-filter: blur(10px);
}

.nav-new-task-btn:hover {
    background: rgba(79, 103, 115, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 103, 115, 0.2);
}

.nav-new-task-btn:active {
    transform: translateY(0);
}

.nav-new-task-icon {
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
}

/* Editor Modal */
.editor-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.editor-modal-overlay.show {
    display: flex;
    opacity: 1;
}

.editor-modal-box {
    width: 100%;
    max-width: 480px;
    margin: 20px;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.editor-modal-overlay.show .editor-modal-box {
    transform: scale(1) translateY(0);
}

.editor-close-btn {
    margin-left: auto;
    width: 30px;
    height: 30px;
    background: rgba(79, 103, 115, 0.1);
    border: none;
    border-radius: 50%;
    color: rgb(56 71 79);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.editor-close-btn:hover {
    background: rgba(79, 103, 115, 0.2);
}
/* ─── PLAN SELECTOR ───────────────────────────────────────────── */
#plan-selector-wrap {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 280px;
    margin: 0 16px;
}

.plan-selector-dropdown {
    position: relative;
    width: 100%;
}

.plan-selector-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(79, 103, 115, 0.25);
    border-radius: 12px;
    color: rgb(18, 18, 18);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    overflow: hidden;
}

.plan-selector-btn:hover {
    background: rgba(79, 103, 115, 0.2);
}

.plan-selector-btn svg:first-child {
    width: 16px;
    height: 16px;
    fill: rgb(56 71 79);
    flex-shrink: 0;
}

.plan-selector-btn span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.plan-chevron {
    width: 18px !important;
    height: 18px !important;
    fill: rgb(56 71 79) !important;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.plan-selector-dropdown.open .plan-chevron {
    transform: rotate(180deg);
}

.plan-dropdown-menu {
    position: fixed;
    top: auto;
    left: auto;
    min-width: 240px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(79, 103, 115, 0.15);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    overflow: hidden;
    padding: 6px;
}

.plan-menu-list {
    max-height: 240px;
    overflow-y: auto;
    margin-bottom: 4px;
}

.plan-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.plan-menu-item:hover {
    background: rgba(79, 103, 115, 0.08);
}

.plan-menu-item.active {
    background: rgba(79, 103, 115, 0.12);
}

.plan-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: rgb(29, 29, 31);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plan-menu-item.active .plan-item-name {
    color: rgb(56 71 79);
    font-weight: 800;
}

.plan-rename-input {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: rgb(29, 29, 31);
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(79, 103, 115, 0.4);
    border-radius: 6px;
    padding: 2px 8px;
    outline: none;
}

.plan-rename-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /*opacity: 0;*/
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}

.plan-rename-btn svg {
    width: 13px;
    height: 13px;
    fill: rgb(79 103 115);
}

.plan-rename-btn:hover {
    background: rgba(79, 103, 115, 0.12);
}

.plan-menu-item:hover .plan-rename-btn {
    opacity: 1;
}

.plan-delete-btn {
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /*opacity: 0;*/
    transition: opacity 0.15s, background 0.15s;
    flex-shrink: 0;
}

.plan-delete-btn svg {
    width: 14px;
    height: 14px;
    fill: #ff3b30;
}

.plan-menu-item:hover .plan-delete-btn {
    opacity: 1;
}

.plan-delete-btn:hover {
    background: rgba(255, 59, 48, 0.1);
}

.plan-new-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(79, 103, 115, 0.1);
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    color: rgb(56 71 79);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
    margin-top: 2px;
}

.plan-new-btn:hover {
    background: rgba(79, 103, 115, 0.08);
}

.plan-new-btn svg {
    width: 16px;
    height: 16px;
    fill: rgb(56 71 79);
    flex-shrink: 0;
}

/* Mobile: Plan-Selector volle Breite */
@media (max-width: 600px) {
    header.glass-card {
        flex-wrap: wrap;
        gap: 10px;
    }
    #plan-selector-wrap {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin: 0;
    }
}

/* Plan Modal Input-Fehler */
.editor-input.input-error {
    border-color: rgba(255, 59, 48, 0.6) !important;
    animation: shake 0.3s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}
/* ═══════════════════════════════════════════════════════════════
   THEME SWITCHER
   ═══════════════════════════════════════════════════════════════ */

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    background: rgba(0,0,0,0.08);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.15);
}

[data-theme="white"] .theme-switcher {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}
[data-theme="dark"] .theme-switcher {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}

.theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    color: var(--text-dark);
    opacity: 0.45;
    transition: background 0.18s, opacity 0.18s, transform 0.12s;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.theme-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
    pointer-events: none;
}

.theme-btn:hover {
    opacity: 0.75;
    background: rgba(255,255,255,0.15);
}
[data-theme="white"] .theme-btn:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"]  .theme-btn:hover { background: rgba(255,255,255,0.08); }

.theme-btn:active { transform: scale(0.92); }

.theme-btn.active {
    opacity: 1;
    background: rgba(255,255,255,0.35);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
[data-theme="white"] .theme-btn.active {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
[data-theme="dark"] .theme-btn.active {
    background: rgba(255,255,255,0.12);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}