/* ===== BOTÕES ===== */
.login-btn, .save-btn, .diagrams-btn {
    padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px;
    background: var(--bg-panel); color: var(--text-secondary); font-size: 12px;
    cursor: pointer; transition: all 0.3s;
}
.login-btn:hover, .save-btn:hover, .diagrams-btn:hover {
    border-color: var(--accent); color: var(--accent);
}
.save-btn, .diagrams-btn { display: none; }
/* ===== CONTEXT MENU ===== */
#context-menu {
    position: fixed; z-index: 200; background: var(--bg-panel);
    border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
    display: none; padding: 6px; max-height: 80vh; overflow-y: auto;
}
.menu-title { font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 6px 10px; }
.menu-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    font-size: 13px; color: var(--text-primary); cursor: pointer; border-radius: 6px;
}
.menu-item:hover { background: var(--bg-hover); }
.menu-item .icon { width: 18px; text-align: center; }
.menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.menu-danger { color: #e94560; }
.menu-search-input {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: 6px; background: var(--bg); color: var(--text-primary);
    font-size: 13px; outline: none; margin-bottom: 6px;
}
.menu-search-results { max-height: 200px; overflow-y: auto; }
.menu-search-result { padding: 6px 10px; cursor: pointer; font-size: 13px; border-radius: 4px; }
.menu-search-result:hover { background: var(--bg-hover); }
.menu-action-btn {
    width: 100%; padding: 8px; border: none; border-radius: 6px;
    background: var(--accent); color: #fff; font-size: 13px; cursor: pointer; margin-top: 6px;
}
/* ===== MODAL CUSTOMIZADO ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 2000;
    display: none; align-items: center; justify-content: center;
}
.modal-overlay.visivel { display: flex; }
.modal-container {
    background: #1e1e1e; border-radius: 12px; width: 440px; max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5); overflow: hidden;
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #333;
}
.modal-title { font-size: 16px; font-weight: 600; color: #fff; }
.modal-close { background: none; border: none; color: #888; font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1; }
.modal-close:hover { color: #fff; }
.modal-body { padding: 20px; }
.modal-field { margin-bottom: 16px; }
.modal-field:last-child { margin-bottom: 0; }
.modal-field label {
    display: block; font-size: 11px; font-weight: 600; color: #aaa;
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.modal-field input, .modal-field textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px;
    border: 1px solid #444; background: #2a2a2a; color: #fff;
    font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box;
    transition: border-color 0.2s;
}
.modal-field input:focus, .modal-field textarea:focus { border-color: #1976d2; }
.modal-field textarea { resize: vertical; min-height: 60px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #333; }
.modal-btn { padding: 8px 20px; border: none; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.2s; }
.modal-btn-cancel { background: #333; color: #bbb; }
.modal-btn-cancel:hover { background: #444; color: #fff; }
.modal-btn-confirm { background: #1976d2; color: #fff; }
.modal-btn-confirm:hover { background: #1565c0; }
/* ===== MENU DO USUÁRIO (dropdown) ===== */
.user-menu { position: relative; display: inline-block; margin: 0 0.5rem; }
.user-menu-btn {
    background: transparent; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 12px; padding: 5px 8px;
    border-radius: 6px; font-family: inherit; display: inline-flex;
    align-items: center; gap: 4px; transition: all 0.3s;
}
.user-menu-btn:hover { color: var(--accent); }
.caret { font-size: 10px; opacity: 0.7; }
.user-dropdown {
    display: none; position: absolute; right: 0; top: 100%; min-width: 230px;
    background: var(--bg-panel); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: var(--shadow); z-index: 1000;
    padding: 6px; margin-top: 4px;
}
.user-dropdown a {
    display: block; padding: 8px 10px; font-size: 13px;
    color: var(--text-primary); text-decoration: none; border-radius: 6px;
}
.user-dropdown a:hover { background: var(--bg-hover); }
.user-dropdown .ud-group {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 8px 10px 4px;
}
.user-dropdown .ud-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.user-dropdown .ud-danger { color: #e94560; }
.user-dropdown .ud-danger:hover { background: var(--bg-hover); }