/* v3.7 - UI Estável NMB */
:root {
    --nmb-blue: #1a1a2e;
    --nmb-green: #00d1b2;
    --bg-light: #f4f7f6;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    height: 100vh;
    background: var(--bg-light);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--nmb-blue) !important;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    background: white !important;
    padding: 20px;
    text-align: center;
    border-bottom: 3px solid var(--nmb-green);
}

.sidebar-logo img {
    max-height: 45px;
    width: auto;
}

.sidebar-admin {
    padding: 15px;
    border-bottom: 1px solid #333;
}

.btn-add-new {
    width: 100%;
    padding: 10px;
    background: var(--nmb-green);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    color: var(--nmb-blue);
}

/* Navegação */
.nav-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.category-btn {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #adb5bd;
    padding: 12px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.submenu {
    list-style: none;
    padding: 0 0 0 15px;
    display: none;
}

.submenu.open {
    display: block;
}

.submenu li {
    padding: 8px;
    font-size: 0.85rem;
    color: #868e96;
    cursor: pointer;
    transition: 0.2s;
}

.submenu li:hover {
    color: var(--nmb-green);
    background: rgba(255, 255, 255, 0.05);
}

/* Dashboard */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: var(--bg-light) !important;
}

.header-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#comp-title {
    color: var(--nmb-blue) !important;
    margin: 0;
    font-size: 1.6rem;
    font-weight: bold;
}

.preview-container {
    flex-grow: 1;
    background: white !important;
    border-radius: 12px;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: radial-gradient(#bcbcbc 1px, transparent 1px) !important;
    background-size: 24px 24px;
    padding: 40px;
    overflow: auto;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-content textarea {
    height: 100px;
    font-family: monospace;
    padding: 10px;
}

.modal-btns {
    display: flex;
    gap: 10px;
}

.save-btn {
    flex: 1;
    padding: 12px;
    background: var(--nmb-green);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.cancel-btn {
    padding: 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Botões de Ação */
.btn-action {
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    margin-left: 8px;
}

.btn-edit {
    background: #f39c12;
}

.btn-html {
    background: #e44d26;
}

.btn-css {
    background: #264de4;
}

.btn-delete {
    background: #c0392b;
    color: white;
}