:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary: #8b5cf6;
    --dark: #0f172a;
    --darker: #020617;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(15, 23, 42, 0.7);
    --border-glow: rgba(99, 102, 241, 0.3);
    --neon-glow: 0 0 20px var(--primary);
    --card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 20%),
        linear-gradient(45deg, var(--darker) 0%, #111827 100%);
}

/* ===== TOP BAR ===== */
.nexus-top-bar {
    background: var(--glass-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.user-holo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--glass);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.user-holo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.user-holo-card:hover::before {
    left: 100%;
}

.hologram-avatar {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: var(--neon-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.user-greeting h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    background: linear-gradient(90deg, var(--light), #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-greeting p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.nexus-actions {
    display: flex;
    gap: 1rem;
}

/* ===== BUTTONS ===== */
.nexus-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    background: var(--glass);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nexus-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.nexus-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 15px var(--border-glow);
    border-color: var(--primary);
}

.nexus-btn:hover::before {
    left: 100%;
    transition: left 0.6s;
}

.nexus-btn.primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.nexus-btn.danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.nexus-btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* ===== EDITOR LAYOUT ===== */
.nexus-editor-container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 2rem;
}

/* ===== SIDEBARS ===== */
.nexus-sidebar {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insert-buttons-grid {
    display: grid;
    gap: 0.75rem;
}

.insert-btn {
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.insert-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    transform: translateX(5px);
}

.insert-btn i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* ===== MAIN EDITOR AREA ===== */
.nexus-editor-main {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80vh;
}

/* ===== TÍTULO EDITÁVEL ===== */
.title-holo {
    font-family: 'Poppins', sans-serif;
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(99, 102, 241, 0.3);
    outline: none;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.title-holo:focus {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
    background-color: rgba(15, 23, 42, 0.9);
}

/* Adicione um placeholder visível */
.title-holo:empty:before {
    content: "Clique para editar o título...";
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.title-holo:empty:focus:before {
    content: "";
}

/* Melhor contraste para melhor legibilidade */
.title-holo::selection {
    background: rgba(99, 102, 241, 0.5);
    color: white;
}

.title-holo::-moz-selection {
    background: rgba(99, 102, 241, 0.5);
    color: white;
}

.content-holo-area {
    min-height: 500px;
    padding: 2rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.content-holo-area.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

/* ===== CONTENT ITEMS ===== */
.item {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.item:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.numero-sequencial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    margin-right: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.numero-sequencial:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.item-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.item:hover .item-actions {
    opacity: 1;
}

.btn-acao {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-acao:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.btn-excluir {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.btn-excluir:hover {
    background: #ef4444 !important;
    color: white !important;
}

.item-texto {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.item-texto:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.media-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

.media-container img,
.media-container video,
.media-container audio {
    max-width: 100%;
    border-radius: 12px;
    transition: width 0.2s ease;
}

.placeholder-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.placeholder-media:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.item-divisor-container {
    background: none !important;
    border: none !important;
    text-align: center;
}

.item-divisor {
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    border: none;
    margin: 1rem 0;
    width: 100%;
}

/* ===== SIZE CONTROLS ===== */
.size-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.size-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.size-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.size-value {
    font-weight: 600;
    color: var(--light);
    min-width: 50px;
    text-align: center;
}

/* ===== FLOATING ACTION BAR ===== */
.nexus-floating-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: var(--glass-dark);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
    z-index: 100;
}

/* ===== MODALS ===== */
.nexus-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nexus-modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    position: relative;
}

.nexus-modal-content.small {
    max-width: 500px;
}

.nexus-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nexus-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* ===== DOCUMENT CARDS ===== */
.document-holo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.holo-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    cursor: pointer;
}

.holo-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.doc-icon {
    font-size: 2rem;
    color: var(--primary);
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
}

.doc-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.doc-action-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.doc-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--light);
}

.doc-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== EMPTY STATE ===== */
.empty-holo-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 20px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.empty-icon {
    font-size: 4rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    color: var(--light);
    margin-bottom: 0.75rem;
}

.empty-subtitle {
    color: #94a3b8;
    max-width: 400px;
    margin: 0 auto;
}

/* ===== PROPERTY CONTROLS ===== */
.property-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.property-label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 500;
}

.property-input {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light);
    font-family: 'Inter', sans-serif;
}

.property-number {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light);
    font-family: 'Inter', sans-serif;
}

.tool-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tool-btn {
    padding: 0.75rem 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.tool-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

/* ===== FORMATTING BAR ===== */
.barra-formatar {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 0.5rem;
    display: none;
    z-index: 10000;
    gap: 0.25rem;
    flex-wrap: wrap;
    width: auto;
    min-width: 200px;
}

.btn-formato {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-formato:hover {
    background: var(--primary);
    transform: scale(1.1);
}

/* ===== DRAG & DROP ===== */
.conteudo.drag-over {
    background: rgba(99, 102, 241, 0.05) !important;
    border: 2px dashed var(--primary) !important;
    border-radius: 20px;
}

.item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.item.drag-over {
    border-left: 3px solid var(--primary);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .nexus-editor-container {
        grid-template-columns: 1fr;
    }
    
    .nexus-sidebar {
        position: static;
        margin-bottom: 1.5rem;
    }
    
    .document-holo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nexus-top-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nexus-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nexus-floating-bar {
        flex-wrap: wrap;
        justify-content: center;
        bottom: 1rem;
        width: 90%;
    }
    
    .nexus-modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .document-holo-grid {
        grid-template-columns: 1fr;
    }
    
    .title-holo {
        font-size: 2rem;
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nexus-editor-container {
        padding: 0 1rem;
    }
    
    .nexus-editor-main {
        padding: 1.5rem;
    }
    
    .nexus-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .user-holo-card {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .insert-buttons-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
    border: 2px solid var(--darker);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* ===== BOTÕES DE MOVER ===== */
.btn-mover-cima, .btn-mover-baixo {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: var(--primary) !important;
}

.btn-mover-cima:hover, .btn-mover-baixo:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Garantir que os botões apareçam em divisores */
.item-divisor-container .item-actions {
    position: relative;
    top: 0;
    right: 0;
    opacity: 1;
    margin-bottom: 1rem;
    justify-content: center;
}

.item-divisor-container:hover .item-actions {
    opacity: 1;
}

/* Select legível (dropdown nativo) */
select.property-input{
  color: rgba(255,255,255,.92) !important;
  background: rgba(30, 41, 59, 0.55) !important;
  border: 1px solid rgba(255,255,255,.08);
}

/* Opções do dropdown */
select.property-input option{
  color: #111 !important;           /* texto escuro */
  background: #fff !important;      /* fundo claro (mais compatível) */
}

/* Placeholder do select (primeira opção vazia) */
select.property-input option[value=""]{
  color: #555 !important;
}

/* Alinhamento de mídia (imagem/vídeo/áudio) */
.media-container { display:flex; justify-content:center; margin:10px 0; }
.item.align-left  .media-container { justify-content:flex-start; }
.item.align-center .media-container { justify-content:center; }
.item.align-right .media-container { justify-content:flex-end; }

/* (Opcional) ícone ativo */
.btn-acao.is-active{
  background: var(--primary) !important;
  color: #fff !important;
}