.editor-toggle,
.editor-panel,
.editor-notification,
.editor-badge,
.editor-device-bar {
    display: none !important;
}

body.editor-active .editor-toggle,
body.editor-active .editor-panel,
body.editor-active .editor-badge,
body.editor-active .editor-device-bar {
    display: flex !important;
}
body.editor-active .editor-panel {
    display: flex !important;
}

.editor-badge {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    padding: 8px 20px;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.editor-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    padding: 14px 24px;
    background: rgba(5, 8, 16, 0.95);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transition: all 0.3s ease;
}

.editor-toggle:hover {
    background: var(--accent-green);
    color: var(--darker-bg);
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.5);
}

body.editor-active [data-editable] {
    outline: 2px dashed rgba(0, 255, 136, 0.25);
    outline-offset: 4px;
    cursor: pointer;
    transition: outline-color 0.15s ease, outline-style 0.15s ease;
}

body.editor-active [data-editable]:hover {
    outline-color: var(--accent-green);
    outline-style: solid;
}

body.editor-active [data-editable].editor-selected {
    outline-color: var(--cyan);
    outline-style: solid;
    outline-width: 3px;
    outline-offset: 3px;
}

.editor-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 440px;
    height: 100vh;
    z-index: 9999;
    background: rgba(5, 8, 16, 0.98);
    border-left: 2px solid var(--cyan);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    flex-direction: column;
    overflow: hidden;
}

.editor-panel.open {
    right: 0;
}

.editor-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: rgba(0, 240, 255, 0.03);
}

.editor-panel-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.editor-panel-close {
    background: none;
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--cyan);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 10px;
    font-family: 'Share Tech Mono', monospace;
    transition: all 0.2s ease;
    line-height: 1;
}

.editor-panel-close:hover {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--cyan);
}

.editor-section-nav {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    flex-shrink: 0;
}

.editor-section-nav label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--accent-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.editor-section-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.editor-section-btn {
    padding: 5px 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: rgba(0, 240, 255, 0.6);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-section-btn:hover,
.editor-section-btn.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}

.editor-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.editor-panel-body::-webkit-scrollbar {
    width: 6px;
}

.editor-panel-body::-webkit-scrollbar-track {
    background: rgba(0, 240, 255, 0.03);
}

.editor-panel-body::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.2);
    border-radius: 3px;
}

.editor-no-selection {
    text-align: center;
    padding: 60px 20px;
    color: rgba(0, 240, 255, 0.4);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    line-height: 2;
}

.editor-component-tag {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--accent-purple);
    padding: 3px 10px;
    background: rgba(176, 132, 255, 0.1);
    border: 1px solid rgba(176, 132, 255, 0.3);
    display: inline-block;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.editor-field {
    margin-bottom: 16px;
}

.editor-field label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--accent-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.editor-field textarea,
.editor-field input[type="text"],
.editor-field input[type="number"],
.editor-field input[type="url"],
.editor-field select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: var(--cyan);
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.editor-field textarea:focus,
.editor-field input:focus,
.editor-field select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.editor-field textarea {
    min-height: 80px;
    resize: vertical;
}

.editor-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300F0FF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.editor-field select option {
    background: #0A0E1A;
    color: var(--cyan);
}

.editor-row {
    display: flex;
    gap: 10px;
}

.editor-row .editor-field {
    flex: 1;
    min-width: 0;
}

.editor-field input[type="color"] {
    width: 100%;
    height: 36px;
    padding: 2px;
    border: 1px solid rgba(0, 240, 255, 0.25);
    background: rgba(0, 240, 255, 0.05);
    cursor: pointer;
    outline: none;
}

.editor-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-color-row input[type="color"] {
    width: 40px;
    height: 36px;
    flex-shrink: 0;
}

.editor-color-row input[type="text"] {
    flex: 1;
}

.editor-palette {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.editor-palette-swatch {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(0, 240, 255, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.editor-palette-swatch:hover {
    transform: scale(1.2);
    border-color: var(--cyan);
}

.editor-align-group {
    display: flex;
    gap: 0;
}

.editor-align-btn {
    flex: 1;
    padding: 8px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: rgba(0, 240, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.editor-align-btn:not(:last-child) {
    border-right: none;
}

.editor-align-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan);
}

.editor-align-btn.active {
    background: rgba(0, 240, 255, 0.2);
    color: var(--cyan);
    border-color: var(--cyan);
}

.editor-divider {
    height: 1px;
    background: rgba(0, 240, 255, 0.1);
    margin: 20px 0;
}

.editor-section-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(0, 240, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.editor-img-preview {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.editor-upload-btn {
    width: 100%;
    padding: 10px;
    background: rgba(0, 240, 255, 0.08);
    border: 1px dashed rgba(0, 240, 255, 0.3);
    color: var(--cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin-bottom: 10px;
}

.editor-upload-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--cyan);
}

.editor-fit-group {
    display: flex;
    gap: 0;
}

.editor-fit-btn {
    flex: 1;
    padding: 6px 4px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    color: rgba(0, 240, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
}

.editor-fit-btn:not(:last-child) {
    border-right: none;
}

.editor-fit-btn:hover {
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan);
}

.editor-fit-btn.active {
    background: rgba(0, 240, 255, 0.2);
    color: var(--cyan);
    border-color: var(--cyan);
}

.editor-actions {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.editor-actions button {
    flex: 1;
    padding: 10px 16px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.editor-save {
    background: var(--accent-green);
    border: 2px solid var(--accent-green);
    color: var(--darker-bg);
}

.editor-save:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.editor-cancel {
    background: transparent;
    border: 2px solid rgba(0, 240, 255, 0.3);
    color: var(--cyan);
}

.editor-cancel:hover {
    border-color: var(--cyan);
    background: rgba(0, 240, 255, 0.1);
}

body.editor-active .editor-notification {
    display: block !important;
}

.editor-notification {
    position: fixed;
    top: 50px;
    right: 24px;
    z-index: 10001;
    padding: 12px 20px;
    background: rgba(5, 8, 16, 0.95);
    border: 2px solid var(--accent-green);
    color: var(--accent-green);
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    transform: translateX(calc(100% + 24px));
    transition: transform 0.3s ease;
}

.editor-notification.show {
    transform: translateX(0);
}

.editor-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: rgba(0, 240, 255, 0.7);
}

.editor-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--cyan);
    cursor: pointer;
}

.editor-link-fields {
    padding: 10px 14px;
    background: rgba(0, 240, 255, 0.03);
    border: 1px solid rgba(0, 240, 255, 0.1);
    margin-top: 8px;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.editor-pw-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.editor-pw-modal {
    background: #0d1117;
    border: 1px solid var(--cyan);
    border-radius: 10px;
    padding: 36px 32px 28px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.15);
}

.editor-pw-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    color: var(--cyan);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.editor-pw-desc {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
}

.editor-pw-input {
    width: 100%;
    padding: 10px 14px;
    background: #161b22;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.editor-pw-input:focus {
    border-color: var(--cyan);
}

.editor-pw-error {
    color: #FF6B6B;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    margin-top: 10px;
}

.editor-pw-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.editor-pw-btn {
    flex: 1;
    padding: 10px 0;
    border: 1px solid var(--cyan);
    border-radius: 6px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.editor-pw-btn:hover {
    background: rgba(0, 229, 255, 0.25);
}

.editor-pw-btn-cancel {
    background: transparent;
    border-color: #555;
    color: #888;
}

.editor-pw-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #bbb;
}

.editor-logout-wrap {
    padding: 12px 16px;
    border-top: 1px solid #222;
    margin-top: auto;
}

.editor-logout-btn {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: 1px solid #555;
    border-radius: 5px;
    color: #888;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.editor-logout-btn:hover {
    border-color: #FF6B6B;
    color: #FF6B6B;
}

.editor-device-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 440px;
    z-index: 10002;
    height: 44px;
    background: rgba(5, 8, 16, 0.97);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.editor-device-btns {
    display: flex;
    gap: 2px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.editor-device-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    color: rgba(0, 240, 255, 0.5);
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.editor-device-btn:hover {
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
}

.editor-device-btn.active {
    background: rgba(0, 240, 255, 0.18);
    color: var(--cyan);
}

.editor-device-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(0, 240, 255, 0.4);
    letter-spacing: 1px;
}

body.editor-active .editor-canvas {
    padding-top: 44px;
    margin-right: 440px;
    transition: width 0.3s ease;
}

body.editor-active.editor-view-tablet .editor-canvas,
body.editor-active.editor-view-mobile .editor-canvas {
    margin-left: auto;
    margin-right: calc(440px + ((100vw - 440px - var(--canvas-w)) / 2));
    overflow-x: hidden;
}

body.editor-active.editor-view-tablet .editor-canvas {
    --canvas-w: 768px;
    max-width: 768px;
}

body.editor-active.editor-view-mobile .editor-canvas {
    --canvas-w: 390px;
    max-width: 390px;
}

body.editor-active .editor-badge {
    top: 52px;
}

.editor-apply-scope {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    flex-shrink: 0;
}

.editor-apply-scope label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: var(--accent-green);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.editor-apply-scope select {
    width: 100%;
    padding: 6px 10px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.25);
    color: var(--cyan);
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    outline: none;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300F0FF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.editor-apply-scope select option {
    background: #0A0E1A;
    color: var(--cyan);
}
